/ vending-app / build.gradle
build.gradle
1 /* 2 * SPDX-FileCopyrightText: 2015 microG Project Team 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6 apply plugin: 'com.android.application' 7 apply plugin: 'kotlin-android' 8 apply plugin: 'com.squareup.wire' 9 10 android { 11 namespace "com.android.vending" 12 compileSdkVersion androidCompileSdk 13 buildToolsVersion "$androidBuildVersionTools" 14 15 defaultConfig { 16 versionName vendingAppVersionName 17 versionCode vendingAppVersionCode 18 minSdkVersion androidMinSdk 19 targetSdkVersion androidTargetSdk 20 21 multiDexEnabled true 22 } 23 24 buildTypes { 25 debug { 26 postprocessing { 27 removeUnusedCode true 28 removeUnusedResources false 29 obfuscate false 30 optimizeCode false 31 proguardFile 'proguard-rules.pro' 32 } 33 } 34 release { 35 postprocessing { 36 removeUnusedCode true 37 removeUnusedResources true 38 obfuscate false 39 optimizeCode true 40 proguardFile 'proguard-rules.pro' 41 } 42 } 43 } 44 45 flavorDimensions = ['target'] 46 productFlavors { 47 "default" { 48 dimension 'target' 49 } 50 "huawei" { 51 dimension 'target' 52 versionNameSuffix "-hw" 53 } 54 "huaweilh" { 55 dimension 'target' 56 versionNameSuffix "-lh" 57 versionCode vendingAppVersionCode - 1000 58 matchingFallbacks = ['huawei'] 59 } 60 } 61 62 sourceSets { 63 main { 64 java { 65 srcDirs += "build/generated/source/proto/main/java" 66 } 67 } 68 } 69 70 71 buildFeatures { 72 aidl = true 73 buildConfig = true 74 compose true 75 } 76 77 lintOptions { 78 disable 'MissingTranslation', 'GetLocales' 79 } 80 81 compileOptions { 82 sourceCompatibility JavaVersion.VERSION_1_8 83 targetCompatibility JavaVersion.VERSION_1_8 84 } 85 86 kotlinOptions { 87 jvmTarget = 1.8 88 } 89 composeOptions { 90 kotlinCompilerExtensionVersion '1.5.10' 91 } 92 } 93 94 dependencies { 95 implementation project(':fake-signature') 96 implementation project(':play-services-auth') 97 implementation project(':play-services-base-core') 98 implementation project(':play-services-core-proto') 99 100 implementation "com.squareup.wire:wire-runtime:$wireVersion" 101 implementation "com.squareup.wire:wire-grpc-client:$wireVersion" 102 103 implementation "com.squareup.okhttp3:okhttp:$okHttpVersion" 104 implementation "io.ktor:ktor-client-core:$ktorVersion" 105 implementation "io.ktor:ktor-client-okhttp:$ktorVersion" 106 107 implementation "androidx.webkit:webkit:$webkitVersion" 108 109 110 //compose 111 implementation platform('androidx.compose:compose-bom:2022.10.00') 112 implementation 'androidx.compose.ui:ui' 113 implementation 'androidx.compose.material3:material3' 114 implementation 'androidx.compose.animation:animation-graphics' 115 implementation 'androidx.activity:activity-compose:1.7.2' 116 implementation("io.coil-kt:coil-compose:2.4.0") 117 implementation("io.coil-kt:coil-svg:2.2.2") 118 implementation "com.google.android.material:material:$materialVersion" 119 implementation "com.google.accompanist:accompanist-systemuicontroller:0.28.0" 120 121 implementation 'androidx.compose.ui:ui-tooling-preview' 122 debugImplementation 'androidx.compose.ui:ui-tooling' 123 124 // Coil (image loading) 125 implementation("io.coil-kt:coil-compose:2.7.0") 126 127 //droidguard 128 implementation project(':play-services-droidguard') 129 implementation project(':play-services-tasks-ktx') 130 131 implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" 132 implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion" 133 134 //androidx 135 implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion" 136 implementation "androidx.core:core-ktx:$coreVersion" 137 implementation "androidx.appcompat:appcompat:$appcompatVersion" 138 implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2' 139 implementation "androidx.preference:preference-ktx:$preferenceVersion" 140 141 // tink 142 implementation "com.google.crypto.tink:tink-android:$tinkVersion" 143 144 // multidex 145 implementation "androidx.multidex:multidex:$multidexVersion" 146 } 147 148 wire { 149 kotlin { 150 javaInterop = true 151 } 152 } 153 154 if (file('user.gradle').exists()) { 155 apply from: 'user.gradle' 156 } 157 158 android.applicationVariants.all { variant -> 159 variant.outputs.each { output -> 160 output.outputFileName = variant.applicationId + "-" + variant.versionCode + variant.versionName.substring(vendingAppVersionName.length()) + ".apk" 161 } 162 }