Skip to content

Commit 8bdd8a5

Browse files
committed
Enable gradle build cache and other performance tweaks
Following: https://docs.gradle.org/current/userguide/performance.html Only took 6 years to read the docs? 🙈
1 parent 58b132d commit 8bdd8a5

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: ./.github/actions/setup-java-gradle
2222

2323
- name: Build and test
24-
run: ./gradlew build
24+
run: ./gradlew build --no-daemon
2525

2626
- name: Upload coverage to Codecov
2727
uses: codecov/codecov-action@v5
@@ -40,7 +40,7 @@ jobs:
4040
- uses: ./.github/actions/setup-java-gradle
4141

4242
- name: Integration test
43-
run: ./gradlew integrationTest
43+
run: ./gradlew integrationTest --no-daemon
4444

4545
- name: Upload coverage to Codecov
4646
uses: codecov/codecov-action@v5

build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ allprojects {
7979
}
8080

8181
tasks.withType<Test> {
82-
maxParallelForks = Runtime.getRuntime().availableProcessors()
82+
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
8383
useJUnitPlatform()
8484
testLogging {
8585
events = setOf(TestLogEvent.FAILED, TestLogEvent.SKIPPED)
@@ -101,6 +101,8 @@ allprojects {
101101
}),
102102
)
103103
}
104+
reports.html.required = false
105+
reports.junitXml.required = false
104106
finalizedBy(tasks.withType<JacocoReport>())
105107
}
106108

gradle.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# https://github.com/google/google-java-format/releases/tag/v1.10.0
2-
org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
2+
org.gradle.jvmargs=-Xmx2048M --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
3+
4+
# https://docs.gradle.org/current/userguide/performance.html
5+
org.gradle.parallel=true
6+
org.gradle.caching=true
37
org.gradle.configuration-cache=true

0 commit comments

Comments
 (0)