Skip to content

Commit

Permalink
Try gradle build speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Jan 9, 2024
1 parent 0c26a55 commit cc5c64f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,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

0 comments on commit cc5c64f

Please sign in to comment.