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-related fixes to avoid running out of memory and variable colision when building against Qt6 #4270

Merged
merged 1 commit into from
May 6, 2023
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
1 change: 1 addition & 0 deletions cmake/Platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ if(ANDROID_ABI)
set(ANDROID_BUILD_TOOLS_VERSION "29.0.2" CACHE STRING "Android build-tools version")
set(ANDROID_TARGET_PLATFORM 31 CACHE INT "Target Android platform SDK version")
set(ANDROID_PLATFORM 21 CACHE INT "Minimum Android platform SDK version")
set(ANDROID_PLATFORM_INT 21 CACHE INT "Minimum Android platform SDK version") # Used in build.gradle.in
set(ANDROID_CPP_FEATURES "rtti exceptions")
endif()
23 changes: 6 additions & 17 deletions platform/android/build.gradle.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext {
buildToolsVersion = "@ANDROID_BUILD_TOOLS_VERSION@"
minSdkVersion = @ANDROID_PLATFORM@
minSdkVersion = @ANDROID_PLATFORM_INT@
compileSdkVersion = @ANDROID_TARGET_PLATFORM@
targetSdkVersion = @ANDROID_TARGET_PLATFORM@
ndkVersion = '@ANDROID_NDK_VERSION@'
Expand Down Expand Up @@ -57,19 +57,8 @@ android {
* Changing them manually might break the compilation!
*******************************************************/

ndkVersion '@ANDROID_NDK_VERSION@'
compileSdkVersion androidCompileSdkVersion.toInteger()


/*
// see https://bugreports.qt.io/browse/QTBUG-69755
// and https://forum.qt.io/topic/86570/incorrect-apk-directory/4
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "../" + outputFileName
}
}
*/
ndkVersion = '@ANDROID_NDK_VERSION@'
compileSdkVersion = androidCompileSdkVersion.toInteger()

sourceSets {
main {
Expand All @@ -85,13 +74,13 @@ android {
}

lintOptions {
abortOnError false
abortOnError = false
disable 'MissingTranslation'
}

defaultConfig {
minSdkVersion @ANDROID_PLATFORM@
targetSdkVersion @ANDROID_TARGET_PLATFORM@
minSdkVersion = @ANDROID_PLATFORM_INT@
targetSdkVersion = @ANDROID_TARGET_PLATFORM@
ndk {
abiFilters "@ANDROID_ABI@"
}
Expand Down
1 change: 1 addition & 0 deletions platform/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4608m