import java.util.Properties import java.io.FileInputStream val keystorePropertiesFile = rootProject.file("keystore.properties") val useKeystoreProperties = keystorePropertiesFile.canRead() val keystoreProperties = Properties() if (useKeystoreProperties) { keystoreProperties.load(FileInputStream(keystorePropertiesFile)) } plugins { id("com.android.application") id("kotlin-android") } java { toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } } android { if (useKeystoreProperties) { signingConfigs { create("release") { storeFile = rootProject.file(keystoreProperties["storeFile"]!!) storePassword = keystoreProperties["storePassword"] as String keyAlias = keystoreProperties["keyAlias"] as String keyPassword = keystoreProperties["keyPassword"] as String } create("play") { storeFile = rootProject.file(keystoreProperties["storeFile"]!!) storePassword = keystoreProperties["storePassword"] as String keyAlias = keystoreProperties["uploadKeyAlias"] as String keyPassword = keystoreProperties["uploadKeyPassword"] as String } } } compileSdk = 33 buildToolsVersion = "34.0.0" namespace = "app.grapheneos.pdfviewer" defaultConfig { applicationId = "app.grapheneos.pdfviewer" minSdk = 26 targetSdk = 33 versionCode = 18 versionName = versionCode.toString() resourceConfigurations.add("en") } buildTypes { getByName("debug") { applicationIdSuffix = ".debug" } getByName("release") { isShrinkResources = true isMinifyEnabled = true proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") if (useKeystoreProperties) { signingConfig = signingConfigs.getByName("release") } } create("play") { initWith(getByName("release")) applicationIdSuffix = ".play" if (useKeystoreProperties) { signingConfig = signingConfigs.getByName("play") } } buildFeatures { viewBinding = true buildConfig = true } } compileOptions { sourceCompatibility(JavaVersion.VERSION_17) targetCompatibility(JavaVersion.VERSION_17) } kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } } dependencies { implementation("androidx.appcompat:appcompat:1.6.1") implementation("com.google.android.material:material:1.9.0") }