apply plugin: 'com.android.application' android { namespace "${QUALIFIED_NAME}" compileSdkVersion ${ANDROID_COMPILE_SDK_VERSION} defaultConfig { applicationId "${QUALIFIED_NAME}" minSdkVersion ${ANDROID_MIN_SDK_VERSION} targetSdkVersion ${ANDROID_TARGET_SDK_VERSION} versionCode ${VERSION_CODE} versionName "${VERSION}" ndk { // For detailed abiFilter descriptions, refer to "Supported ABIs" // at https://developer.android.com/ndk/guides/abis.html#s // See also https://code.google.com/p/android/issues/detail?id=220615 abiFilters ${ANDROID_ABI_LIST} } externalNativeBuild { cmake { /* -DANDROID_STL=c++_shared: Necessary for OpenAL and Oboe, see https://developer.android.com/games/sdk/oboe/update-build-settings */ arguments '-DANDROID_STL=c++_shared', '-DCMAKE_BUILD_TYPE=Release' } } } buildTypes { release { minifyEnabled = false // Not using proguard now // proguardFiles.add(file('proguard-rules.txt')) } } /* Why two externalNativeBuild/cmake sections? See: https://stackoverflow.com/questions/64829357/specify-targets-in-externalnativebuild-of-the-build-gradle-file-no-signature-o */ externalNativeBuild { cmake { path 'src/main/CMakeLists.txt' } } /* Necessary, otherwise using androidx.core makes errors: * What went wrong: Execution failed for task ':app:mergeExtDexDebug'. > Could not resolve all files for configuration ':app:debugRuntimeClasspath'. > Failed to transform core-1.7.0.aar (androidx.core:core:1.7.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-incremental-transform=false, dexing-is-debuggable=true, dexing-min-sdk=16, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Execution failed for DexingNoClasspathTransform: C:\Users\michalis\.gradle\caches\transforms-3\fd3568d9c4b7646659f6c5510e5362f2\transformed\core-1.7.0-runtime.jar. > Error while dexing. The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle android { compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } } See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 24 or above. */ compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } /* Necessary for Oboe, https://developer.android.com/games/sdk/oboe/update-build-settings */ buildFeatures { prefab true } } dependencies { api fileTree(dir: 'libs', include: ['*.jar']) // For ActivityCompat // See https://developer.android.com/jetpack/androidx/releases/activity def activity_version = "1.1.0" implementation "androidx.activity:activity:$activity_version" // For WindowInsetsControllerCompat // See https://developer.android.com/jetpack/androidx/releases/core def core_version = "1.7.0" implementation "androidx.core:core:$core_version" // Do not change the line below, it is necessary for build.gradle merging to work. // MERGE-DEPENDENCIES } // Do not change the line below, it is necessary for build.gradle merging to work. // MERGE-PLUGINS