Skip to content

Commit

Permalink
add parallel build for gradle to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
hakan-krgn committed Aug 14, 2023
1 parent b2cc6da commit 3acb205
Show file tree
Hide file tree
Showing 25 changed files with 206 additions and 21 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.parallel=true
68 changes: 68 additions & 0 deletions hCore-bukkit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,71 @@ dependencies {
implementation project(':hCore-bukkit:nms:v1_19_R3')
implementation project(':hCore-bukkit:nms:v1_20_R1')
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',

':hCore-bukkit:nms:v1_8_R3:jar',
':hCore-bukkit:nms:v1_8_R3:shadowJar',

':hCore-bukkit:nms:v1_9_R1:jar',
':hCore-bukkit:nms:v1_9_R1:shadowJar',

':hCore-bukkit:nms:v1_9_R2:jar',
':hCore-bukkit:nms:v1_9_R2:shadowJar',

':hCore-bukkit:nms:v1_10_R1:jar',
':hCore-bukkit:nms:v1_10_R1:shadowJar',

':hCore-bukkit:nms:v1_11_R1:jar',
':hCore-bukkit:nms:v1_11_R1:shadowJar',

':hCore-bukkit:nms:v1_12_R1:jar',
':hCore-bukkit:nms:v1_12_R1:shadowJar',

':hCore-bukkit:nms:v1_13_R1:jar',
':hCore-bukkit:nms:v1_13_R1:shadowJar',

':hCore-bukkit:nms:v1_13_R2:jar',
':hCore-bukkit:nms:v1_13_R2:shadowJar',

':hCore-bukkit:nms:v1_14_R1:jar',
':hCore-bukkit:nms:v1_14_R1:shadowJar',

':hCore-bukkit:nms:v1_15_R1:jar',
':hCore-bukkit:nms:v1_15_R1:shadowJar',

':hCore-bukkit:nms:v1_16_R1:jar',
':hCore-bukkit:nms:v1_16_R1:shadowJar',

':hCore-bukkit:nms:v1_16_R2:jar',
':hCore-bukkit:nms:v1_16_R2:shadowJar',

':hCore-bukkit:nms:v1_16_R3:jar',
':hCore-bukkit:nms:v1_16_R3:shadowJar',

':hCore-bukkit:nms:v1_17_R1:jar',
':hCore-bukkit:nms:v1_17_R1:shadowJar',

':hCore-bukkit:nms:v1_18_R1:jar',
':hCore-bukkit:nms:v1_18_R1:shadowJar',

':hCore-bukkit:nms:v1_18_R2:jar',
':hCore-bukkit:nms:v1_18_R2:shadowJar',

':hCore-bukkit:nms:v1_19_R1:jar',
':hCore-bukkit:nms:v1_19_R1:shadowJar',

':hCore-bukkit:nms:v1_19_1_R1:jar',
':hCore-bukkit:nms:v1_19_1_R1:shadowJar',

':hCore-bukkit:nms:v1_19_R2:jar',
':hCore-bukkit:nms:v1_19_R2:shadowJar',

':hCore-bukkit:nms:v1_19_R3:jar',
':hCore-bukkit:nms:v1_19_R3:shadowJar',

':hCore-bukkit:nms:v1_20_R1:jar',
':hCore-bukkit:nms:v1_20_R1:shadowJar'
)
5 changes: 5 additions & 0 deletions hCore-bukkit/nms/build.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
tasks.register('cleanup') { doLast { delete 'build' } }
tasks.build.finalizedBy cleanup

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_10_R1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.10.2-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_11_R1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.11-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_12_R1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.12.2-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_13_R1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.13-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_13_R2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.13.1-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_14_R1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.14.4-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_15_R1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.15-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_16_R1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_16_R2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.16.2-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_16_R3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.16.4-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_17_R1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ sourceCompatibility = 16
dependencies {
compileOnly 'org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_18_R1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ dependencies {
compileOnly 'com.mojang:authlib:3.2.28'
compileOnly 'org.spigotmc:spigot:1.18-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_18_R2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ dependencies {
compileOnly 'com.mojang:authlib:3.2.28'
compileOnly 'org.spigotmc:spigot:1.18.2-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_19_1_R1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ dependencies {
compileOnly 'com.mojang:authlib:3.2.28'
compileOnly 'org.spigotmc:spigot:1.19.1-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_19_R1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ dependencies {
compileOnly 'com.mojang:authlib:3.2.28'
compileOnly 'org.spigotmc:spigot:1.19-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_19_R2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ dependencies {
compileOnly 'com.mojang:authlib:3.2.28'
compileOnly 'org.spigotmc:spigot:1.19.3-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_19_R3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ dependencies {
compileOnly 'com.mojang:authlib:3.2.28'
compileOnly 'org.spigotmc:spigot:1.19.4-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_20_R1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ dependencies {
compileOnly 'com.mojang:authlib:3.2.28'
compileOnly 'org.spigotmc:spigot:1.20-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_8_R3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.8.8-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
7 changes: 6 additions & 1 deletion hCore-bukkit/nms/v1_9_R1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.9-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)
8 changes: 7 additions & 1 deletion hCore-bukkit/nms/v1_9_R2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
dependencies {
compileOnly 'org.spigotmc:spigot:1.9.4-R0.1-SNAPSHOT'
compileOnly project(':hCore-bukkit:api')
}
}

tasks.compileJava.dependsOn(
':hCore-bukkit:api:jar',
':hCore-bukkit:api:shadowJar',
)

5 changes: 5 additions & 0 deletions hCore-bungee/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ dependencies {
implementation project(':hCore-bungee:api')
annotationProcessor project(':hCore-bungee:api')
}

tasks.compileJava.dependsOn(
':hCore-bungee:api:jar',
':hCore-bungee:api:shadowJar'
)

0 comments on commit 3acb205

Please sign in to comment.