Parallel gradle builds + explicit output directory
This commit is contained in:
parent
f265e4daf7
commit
0671b45185
4 changed files with 21 additions and 1 deletions
2
.github/workflows/gradle.yml
vendored
2
.github/workflows/gradle.yml
vendored
|
|
@ -28,4 +28,4 @@ jobs:
|
|||
uses: actions/upload-artifact@v2.2.1
|
||||
with:
|
||||
name: ServerUtils
|
||||
path: build/libs/*-all.jar
|
||||
path: jars/*.jar
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,5 +2,6 @@
|
|||
.vs/
|
||||
.gradle/
|
||||
build/
|
||||
jars/
|
||||
*.class
|
||||
*.jar
|
||||
17
build.gradle
17
build.gradle
|
|
@ -66,6 +66,23 @@ dependencies {
|
|||
|
||||
shadowJar {
|
||||
relocate 'dev.frankheijden.minecraftreflection', dependencyDir + '.minecraftreflection'
|
||||
archiveFileName = "${archiveBaseName.orNull}-${archiveVersion.orNull}.${archiveExtension.orNull}"
|
||||
}
|
||||
|
||||
def outputTasks() {
|
||||
["shadowJar", ":Bukkit:shadowJar", ":Bungee:shadowJar"].stream().map({ tasks.findByPath(it) })
|
||||
}
|
||||
|
||||
task copyJars(type: Copy) {
|
||||
outputTasks().forEach({ from(it) })
|
||||
rename '(.*)-all.jar', '$1.jar'
|
||||
into file('jars')
|
||||
}
|
||||
|
||||
task cleanJars() {
|
||||
delete file('jars')
|
||||
}
|
||||
|
||||
clean.dependsOn cleanJars
|
||||
build.dependsOn shadowJar
|
||||
build.dependsOn copyJars
|
||||
|
|
|
|||
2
gradle.properties
Normal file
2
gradle.properties
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
org.gradle.parallel=true
|
||||
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
||||
Loading…
Add table
Add a link
Reference in a new issue