Skip to content

Commit

Permalink
Add runServer, runWaterfall and runVelocity tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Vankka committed Oct 20, 2024
1 parent 2081240 commit fa1b517
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ plugins {
alias(libs.plugins.indra.licenser) apply false
alias(libs.plugins.dependencydownload.plugin) apply false
alias(libs.plugins.idea.ext) apply false
alias(libs.plugins.run.paper) apply false
alias(libs.plugins.run.waterfall) apply false
alias(libs.plugins.run.velocity) apply false
}

version '3.0.0-SNAPSHOT'
Expand Down
7 changes: 7 additions & 0 deletions bukkit/loader/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.apache.tools.ant.filters.ReplaceTokens

apply plugin: 'xyz.jpenilla.run-paper'
apply from: rootProject.file('buildscript/loader.gradle')

dependencies {
Expand All @@ -21,4 +22,10 @@ shadowJar {
archiveBaseName = 'DiscordSRV-Bukkit'
}

tasks {
runServer {
minecraftVersion("1.21.1")
}
}

// buildscript/loader.gradle includes the jarinjar in the jar
7 changes: 7 additions & 0 deletions bungee/loader/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.apache.tools.ant.filters.ReplaceTokens

apply plugin: 'xyz.jpenilla.run-waterfall'
apply from: rootProject.file('buildscript/loader.gradle')

dependencies {
Expand All @@ -18,4 +19,10 @@ shadowJar {
archiveBaseName = 'DiscordSRV-Bungee'
}

tasks {
runWaterfall {
waterfallVersion("1.20")
}
}

// buildscript/loader.gradle includes the jarinjar in the jar
6 changes: 6 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ dependencyResolutionManagement {
plugin('indra-licenser', 'net.kyori.indra.licenser.spotless').version('2.2.0')
plugin('idea-ext', 'org.jetbrains.gradle.plugin.idea-ext').version('1.1.7')

// Run platforms
version('runtask', '2.3.1')
plugin('run-paper', 'xyz.jpenilla.run-paper').versionRef('runtask')
plugin('run-velocity', 'xyz.jpenilla.run-velocity').versionRef('runtask')
plugin('run-waterfall', 'xyz.jpenilla.run-waterfall').versionRef('runtask')

// Bukkit
version('bukkit_minimum', '1.8.8-R0.1-SNAPSHOT')
version('bukkit1_12', '1.12.2-R0.1-SNAPSHOT')
Expand Down
7 changes: 7 additions & 0 deletions velocity/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply from: rootProject.file('buildscript/standalone.gradle')
apply plugin: 'net.kyori.blossom'
apply plugin: 'org.jetbrains.gradle.plugin.idea-ext'
apply plugin: 'xyz.jpenilla.run-velocity'

java {
disableAutoTargetJvm() // Requires Java 17, we target 8
Expand Down Expand Up @@ -49,4 +50,10 @@ dependencies {

// DependencyDownload
implementation(libs.mcdependencydownload.velocity)
}

tasks {
runVelocity {
velocityVersion("3.1.2-SNAPSHOT")
}
}

0 comments on commit fa1b517

Please sign in to comment.