Skip to content

Commit 609547d

Browse files
Improve build speed by altering gradle.properties (#1091)
* build: improve build speed via gradle properties * ci: avoid build optimizations on release build
1 parent ec73635 commit 609547d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
java-version: 17
8888

8989
- name: Build and publish artifacts
90-
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Pfinal=true
90+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Pfinal=true --no-build-cache --no-configuration-cache --no-parallel
9191
env:
9292
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
9393
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}

gradle.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
9+
org.gradle.jvmargs=-Xmx4096M -XX:+UseParallelGC -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx4096M"
10+
org.gradle.parallel=true
11+
org.gradle.caching=true
12+
org.gradle.configuration-cache=true
13+
org.gradle.configuration-cache.problems=fail
14+
org.gradle.configuration-cache.parallel=true
1015
# When configured, Gradle will run in incubating parallel mode.
1116
# This option should only be used with decoupled projects. More details, visit
1217
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects

0 commit comments

Comments
 (0)