diff --git a/src/3rdparty/gradle/CMakeLists.txt b/src/3rdparty/gradle/CMakeLists.txt index a6fbfc962a5..20c0181403f 100644 --- a/src/3rdparty/gradle/CMakeLists.txt +++ b/src/3rdparty/gradle/CMakeLists.txt @@ -6,6 +6,7 @@ qt_copy_or_install( FILES gradlew gradlew.bat + gradle.properties DESTINATION "${destination}" ) diff --git a/src/3rdparty/gradle/gradle.pro b/src/3rdparty/gradle/gradle.pro index 1ff0db20174..5d8efdcfd31 100644 --- a/src/3rdparty/gradle/gradle.pro +++ b/src/3rdparty/gradle/gradle.pro @@ -4,7 +4,8 @@ CONFIG -= qt android_install gradle_files.files = \ $$PWD/gradlew \ - $$PWD/gradlew.bat + $$PWD/gradlew.bat \ + $$PWD/gradle.properties gradle_dirs.files = \ $$PWD/gradle diff --git a/src/3rdparty/gradle/gradle.properties b/src/3rdparty/gradle/gradle.properties new file mode 100644 index 00000000000..554f6aeba19 --- /dev/null +++ b/src/3rdparty/gradle/gradle.properties @@ -0,0 +1,9 @@ +# Project-wide Gradle settings. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m + +# Enable Gradle caching +org.gradle.caching=true diff --git a/src/android/templates/build.gradle b/src/android/templates/build.gradle index d5b3b93499e..c22cd807817 100644 --- a/src/android/templates/build.gradle +++ b/src/android/templates/build.gradle @@ -51,6 +51,10 @@ android { } } + tasks.withType(JavaCompile) { + options.incremental = true + } + lintOptions { abortOnError false } diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index 47a06673873..558e5039734 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -2445,7 +2445,7 @@ bool buildAndroidProject(const Options &options) return false; } - QString commandLine = QLatin1String("%1 --no-daemon %2").arg(shellQuote(gradlePath), options.releasePackage ? QLatin1String(" assembleRelease") : QLatin1String(" assembleDebug")); + QString commandLine = QLatin1String("%1 %2").arg(shellQuote(gradlePath), options.releasePackage ? QLatin1String(" assembleRelease") : QLatin1String(" assembleDebug")); if (options.buildAAB) commandLine += QLatin1String(" bundle");