Skip to content

Commit

Permalink
[plugin] change copyToServer task
Browse files Browse the repository at this point in the history
usage: `gradle copyToServer -PtestServerVersion=1_12_2`
  • Loading branch information
iGabyTM committed Jan 9, 2022
1 parent d0b10d8 commit 5375184
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
kotlin.code.style=official
kotlin.code.style=official
testServerVersion=
19 changes: 12 additions & 7 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ dependencies {
compileOnly fileTree(dir: './libs', includes: ['*.jar'])
}

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}

processResources {
eachFile { expand version: project.version }
}
Expand All @@ -79,12 +85,11 @@ shadowJar {
}

task copyToServer(type: Copy) {
from shadowJar
into '../server/plugins'
}

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
if (testServerVersion == '') {
from shadowJar
into '../server/plugins'
} else {
from shadowJar
into '../server/.' + testServerVersion + '/plugins'
}
}

0 comments on commit 5375184

Please sign in to comment.