| 1 |
# Addresses the warning at ":app:transformClassesWithDexForRelease" |
| 2 |
# To run dex in process, the Gradle daemon needs a larger heap. |
| 3 |
# It currently has approximately 871 MB. |
| 4 |
# For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB. |
| 5 |
# To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties. |
| 6 |
# For more information see https://docs.gradle.org/current/userguide/build_environment.html |
| 7 |
|
| 8 |
# Later: hm, but it does seem to fail on some systems... |
| 9 |
# You can get errors |
| 10 |
# Error occurred during initialization of VM |
| 11 |
# Could not reserve enough space for 2097152KB object heap |
| 12 |
# even with latest JDK 1.8.0_101 on Windows 32-bit |
| 13 |
# on a system with 4 GB RAM... |
| 14 |
|
| 15 |
# org.gradle.jvmargs=-Xms2048M -Xmx2048M |
| 16 |
|
| 17 |
# To support Java 17, we need this: |
| 18 |
# https://github.com/fluttercommunity/flutter_workmanager/issues/287 |
| 19 |
# https://stackoverflow.com/questions/42667837/running-application-with-java-9-module-java-base-does-not-opens-java-io |
| 20 |
org.gradle.jvmargs=--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED |
| 21 |
|
| 22 |
# Since Android Gradle 4.2.2 (was not necessary with 4.1.0) we need this, |
| 23 |
# otherwise we get errors like |
| 24 |
# |
| 25 |
# > This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry. |
| 26 |
# The following AndroidX dependencies are detected: androidx.lifecycle:lifecycle-runtime:2.3.1, androidx.core:core:1.7.0, androidx.concurrent:concurrent-futures:1.0.0, androidx.lifecycle:lifecycle-common:2.3.1, androidx.versionedparcelable:versionedparcelable:1.1.1, androidx.lifecycle:lifecycle-viewmodel:2.2.0, androidx.annotation:annotation-experimental:1.1.0, androidx.activity:activity:1.1.0, androidx.collection:collection:1.0.0, androidx.arch.core:core-runtime:2.1.0, androidx.lifecycle:lifecycle-livedata-core:2.2.0, androidx.arch.core:core-common:2.1.0, androidx.annotation:annotation:1.2.0, androidx.savedstate:savedstate:1.0.0, androidx.lifecycle:lifecycle-viewmodel-savedstate:1.0.0 |
| 27 |
android.useAndroidX=true |
| 28 |
|
| 29 |
# Gradle deamon is automatically initialized since Gradle version 3.0 |
| 30 |
# (see https://docs.gradle.org/current/userguide/gradle_daemon.html) |
| 31 |
# but it prevents removing the castle-engine-output/android/project/ . |
| 32 |
# E.g. you cannot run "castle-engine package --os=android --cpu=arm" |
| 33 |
# again in the same directory, because it cannot remove the |
| 34 |
# "castle-engine-output/android/project/" at the beginning. |
| 35 |
# |
| 36 |
# It seems the current directory of Java (Gradle) process is inside |
| 37 |
# castle-engine-output/android/project/, and Windows and Linux don't allow to remove such |
| 38 |
# directory. |
| 39 |
# |
| 40 |
# - Windows: Doing "rm -Rf castle-engine-output/android/project/" (rm.exe from Cygwin) |
| 41 |
# also fails with |
| 42 |
# |
| 43 |
# rm: cannot remove 'castle-engine-output/android/project/': Device or resource busy |
| 44 |
# |
| 45 |
# - Linux: The same problem later happened on Linux (Jenkins unholy-society, |
| 46 |
# Android build in Docker). |
| 47 |
# These files |
| 48 |
# |
| 49 |
# castle-engine-output/android/project/\?/.gradle/daemon/8.0/registry.bin |
| 50 |
# castle-engine-output/android/project/\?/.gradle/daemon/8.0/registry.bin.lock |
| 51 |
# |
| 52 |
# remained, locked by the Gradle daemon, and prevented removing |
| 53 |
# castle-engine-output later. |
| 54 |
# |
| 55 |
# - Maybe related to |
| 56 |
# https://discuss.gradle.org/t/the-gradle-daemon-prevents-a-clean/2473/13 |
| 57 |
# https://github.com/gradle/gradle/issues/937 |
| 58 |
org.gradle.daemon=false |