|
| 1 | +import java.util.Properties |
| 2 | +import java.io.FileInputStream |
| 3 | + |
| 4 | +plugins { |
| 5 | + alias(libs.plugins.android.application) |
| 6 | +} |
| 7 | + |
| 8 | +// Place actual signing configuration in "keystore.properties" |
| 9 | +// "keystore.properties" is in .gitignore and will not be checked into repo |
| 10 | +val keystorePropertiesFile = rootProject.file("keystore.properties").let { |
| 11 | + if (it.exists()) it else rootProject.file("dummy_keystore.properties") |
| 12 | +} |
| 13 | +val keystoreProperties = Properties().apply { |
| 14 | + load(FileInputStream(keystorePropertiesFile)) |
| 15 | +} |
| 16 | + |
| 17 | +android { |
| 18 | + namespace = "de.stephanlindauer.criticalmaps" |
| 19 | + |
| 20 | + signingConfigs { |
| 21 | + create("releaseConfig") { |
| 22 | + keyAlias = keystoreProperties["keyAlias"] as String |
| 23 | + keyPassword = keystoreProperties["keyPassword"] as String |
| 24 | + storeFile = file(keystoreProperties["storeFile"] as String) |
| 25 | + storePassword = keystoreProperties["storePassword"] as String |
| 26 | + } |
| 27 | + } |
| 28 | + |
| 29 | + compileSdk { |
| 30 | + version = release(36) |
| 31 | + } |
| 32 | + |
| 33 | + defaultConfig { |
| 34 | + applicationId = "de.stephanlindauer.criticalmaps" |
| 35 | + minSdk = 26 |
| 36 | + targetSdk = 36 |
| 37 | + versionCode = 50 |
| 38 | + versionName = "2.9.2" |
| 39 | + vectorDrawables.useSupportLibrary = true |
| 40 | + |
| 41 | + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
| 42 | + testInstrumentationRunnerArguments["disableAnalytics"] = "true" |
| 43 | + } |
| 44 | + |
| 45 | + buildTypes { |
| 46 | + debug { |
| 47 | + applicationIdSuffix = ".debug" |
| 48 | + isPseudoLocalesEnabled = true |
| 49 | + isMinifyEnabled = false |
| 50 | + proguardFiles( |
| 51 | + getDefaultProguardFile("proguard-android-optimize.txt"), |
| 52 | + "proguard-rules.pro" |
| 53 | + ) |
| 54 | + } |
| 55 | + release { |
| 56 | + isMinifyEnabled = true |
| 57 | + proguardFiles( |
| 58 | + getDefaultProguardFile("proguard-android-optimize.txt"), |
| 59 | + "proguard-rules.pro" |
| 60 | + ) |
| 61 | + signingConfig = signingConfigs["releaseConfig"] |
| 62 | + } |
| 63 | + } |
| 64 | + |
| 65 | + packaging { |
| 66 | + resources { |
| 67 | + excludes += "META-INF/services/javax.annotation.processing.Processor" |
| 68 | + } |
| 69 | + } |
| 70 | + |
| 71 | + compileOptions { |
| 72 | + sourceCompatibility = JavaVersion.VERSION_11 |
| 73 | + targetCompatibility = JavaVersion.VERSION_11 |
| 74 | + } |
| 75 | + |
| 76 | + buildFeatures { |
| 77 | + viewBinding = true |
| 78 | + buildConfig = true |
| 79 | + } |
| 80 | + |
| 81 | + lint { |
| 82 | + warning += "MissingTranslation" + "StringFormatInvalid" + "NewApi" + "InvalidPackage" |
| 83 | + } |
| 84 | +} |
| 85 | + |
| 86 | +dependencies { |
| 87 | + implementation(libs.otto) |
| 88 | + implementation(libs.maplibre) |
| 89 | + implementation(libs.picasso) |
| 90 | + implementation(libs.timber) |
| 91 | + implementation(libs.okhttp) |
| 92 | + implementation(libs.typed.preferences) |
| 93 | + implementation(libs.material) |
| 94 | + implementation(libs.androidx.core) |
| 95 | + implementation(libs.androidx.appcompat) |
| 96 | + implementation(libs.androidx.annotation) |
| 97 | + implementation(libs.androidx.exifinterface) |
| 98 | + implementation(libs.androidx.constraintlayout) |
| 99 | + |
| 100 | + implementation(libs.dagger) |
| 101 | + annotationProcessor(libs.dagger.compiler) |
| 102 | + |
| 103 | + debugImplementation(libs.leakcanary) |
| 104 | + |
| 105 | + testImplementation(libs.junit) |
| 106 | + testImplementation(libs.com.google.truth) |
| 107 | + testImplementation(libs.org.mockito.core) |
| 108 | + |
| 109 | + androidTestImplementation(libs.androidx.junit) |
| 110 | + androidTestImplementation(libs.androidx.test.core) |
| 111 | + androidTestImplementation(libs.androidx.test.runner) |
| 112 | + androidTestImplementation(libs.androidx.test.rules) |
| 113 | + androidTestImplementation(libs.androidx.espresso.core) |
| 114 | +} |
0 commit comments