blob: 1ea4cca3c02a7f1eb0e55e2a798d18a7f1de783e [file] [log] [blame]
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")
kotlin("android")
kotlin("kapt")
}
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 = "33.0.0"
defaultConfig {
applicationId = "app.grapheneos.camera"
minSdk = 29
targetSdk = 32
versionCode = 45
versionName = versionCode.toString()
}
buildTypes {
getByName("release") {
isShrinkResources = true
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
if (useKeystoreProperties) {
signingConfig = signingConfigs.getByName("release")
}
resValue("string", "app_name", "Camera")
}
getByName("debug") {
applicationIdSuffix = ".dev"
resValue("string", "app_name", "Camera d")
// isDebuggable = false
}
create("play") {
initWith(getByName("release"))
applicationIdSuffix = ".play"
if (useKeystoreProperties) {
signingConfig = signingConfigs.getByName("play")
}
}
}
compileOptions {
sourceCompatibility(JavaVersion.VERSION_11)
targetCompatibility(JavaVersion.VERSION_11)
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
buildFeatures {
viewBinding = true
}
lintOptions {
disable("LintError")
}
}
dependencies {
implementation("androidx.appcompat:appcompat:1.4.2")
implementation("com.google.android.material:material:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
val cameraVersion = "1.2.0-alpha04"
implementation("androidx.camera:camera-core:$cameraVersion")
implementation("androidx.camera:camera-camera2:$cameraVersion")
implementation("androidx.camera:camera-lifecycle:$cameraVersion")
implementation("androidx.camera:camera-video:$cameraVersion")
implementation("androidx.camera:camera-view:$cameraVersion")
implementation("androidx.camera:camera-extensions:$cameraVersion")
implementation("com.google.zxing:core:3.5.0")
}