Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle build speedup #11300

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ tasks.register('generateCitaviSource', XjcTask) {

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'

// hint by https://docs.gradle.org/current/userguide/performance.html#run_the_compiler_as_a_separate_process
options.fork = true
}

compileJava {
Expand Down
10 changes: 10 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
org.gradle.vs.watch=true

# hint by https://docs.gradle.org/current/userguide/performance.html#increase_the_heap_size
org.gradle.jvmargs=-Xmx4096M

# hint by https://docs.gradle.org/current/userguide/performance.html#enable_configuration_cache
# Does not work:
# - Task `:compileJava` of type `org.gradle.api.tasks.compile.JavaCompile`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
# org.gradle.configuration-cache=false

# hint by https://docs.gradle.org/current/userguide/performance.html#enable_the_build_cache
org.gradle.caching=true
Loading