Debian Codegraph @

tools/build-tool/data/android/integrated/app/build.gradle

raw
1 apply plugin: 'com.android.application'
2
3 android {
4 namespace "${QUALIFIED_NAME}"
5
6 compileSdkVersion ${ANDROID_COMPILE_SDK_VERSION}
7
8 defaultConfig {
9 applicationId "${QUALIFIED_NAME}"
10 minSdkVersion ${ANDROID_MIN_SDK_VERSION}
11 targetSdkVersion ${ANDROID_TARGET_SDK_VERSION}
12 versionCode ${VERSION_CODE}
13 versionName "${VERSION}"
14
15 ndk {
16 // For detailed abiFilter descriptions, refer to "Supported ABIs"
17 // at https://developer.android.com/ndk/guides/abis.html#s
18 // See also https://code.google.com/p/android/issues/detail?id=220615
19 abiFilters ${ANDROID_ABI_LIST}
20 }
21
22 externalNativeBuild {
23 cmake {
24 /* -DANDROID_STL=c++_shared:
25 Necessary for OpenAL and Oboe, see
26 https://developer.android.com/games/sdk/oboe/update-build-settings
27 */
28 arguments '-DANDROID_STL=c++_shared', '-DCMAKE_BUILD_TYPE=Release'
29 }
30 }
31
32 }
33
34 buildTypes {
35 release {
36 minifyEnabled = false
37 // Not using proguard now
38 // proguardFiles.add(file('proguard-rules.txt'))
39 }
40 }
41
42 /* Why two externalNativeBuild/cmake sections? See: https://stackoverflow.com/questions/64829357/specify-targets-in-externalnativebuild-of-the-build-gradle-file-no-signature-o */
43 externalNativeBuild {
44 cmake {
45 path 'src/main/CMakeLists.txt'
46 }
47 }
48
49 /* Necessary, otherwise using androidx.core makes errors:
50
51 * What went wrong:
52 Execution failed for task ':app:mergeExtDexDebug'.
53 > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
54 > 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}.
55 > Execution failed for DexingNoClasspathTransform: C:\Users\michalis\.gradle\caches\transforms-3\fd3568d9c4b7646659f6c5510e5362f2\transformed\core-1.7.0-runtime.jar.
56 > Error while dexing.
57 The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
58 android {
59 compileOptions {
60 sourceCompatibility 1.8
61 targetCompatibility 1.8
62 }
63 }
64 See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 24 or above.
65
66 */
67 compileOptions {
68 sourceCompatibility 1.8
69 targetCompatibility 1.8
70 }
71
72 /* Necessary for Oboe,
73 https://developer.android.com/games/sdk/oboe/update-build-settings */
74 buildFeatures {
75 prefab true
76 }
77 }
78
79 dependencies {
80 api fileTree(dir: 'libs', include: ['*.jar'])
81
82 // For ActivityCompat
83 // See https://developer.android.com/jetpack/androidx/releases/activity
84 def activity_version = "1.1.0"
85 implementation "androidx.activity:activity:$activity_version"
86
87 // For WindowInsetsControllerCompat
88 // See https://developer.android.com/jetpack/androidx/releases/core
89 def core_version = "1.7.0"
90 implementation "androidx.core:core:$core_version"
91
92 // Do not change the line below, it is necessary for build.gradle merging to work.
93 // MERGE-DEPENDENCIES
94 }
95
96 // Do not change the line below, it is necessary for build.gradle merging to work.
97 // MERGE-PLUGINS