release setup
This commit is contained in:
parent
2ca272a087
commit
9446ff4ac2
9 changed files with 428 additions and 3 deletions
|
|
@ -2,16 +2,20 @@ plugins {
|
|||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
// custom properties
|
||||
def applicationIdArgument = project.findProperty('applicationId')
|
||||
def applicationVersionCodeArgument = project.findProperty('versionCode')?.isInteger() ? project.findProperty('versionCode')?.toInteger() : null
|
||||
def useDebugSigningForReleaseBuild = project.findProperty('useDebugSigningForReleaseBuild')?.toBoolean() ?: false
|
||||
|
||||
android {
|
||||
namespace 'org.fnives.android.qrcodetransfer'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.fnives.android.qrcodetransfer"
|
||||
applicationId applicationIdArgument ?: "org.fnives.android.qrcodetransfer"
|
||||
minSdk 26
|
||||
targetSdk 34
|
||||
versionCode 1
|
||||
versionCode applicationVersionCodeArgument ?: 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
|
@ -20,9 +24,29 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file('debug.keystore')
|
||||
storePassword 'android'
|
||||
keyAlias 'androiddebugkey'
|
||||
keyPassword 'android'
|
||||
}
|
||||
release {
|
||||
storeFile file(System.getenv("BROQROLI_KEYSTORE") ?: 'debug.keystore')
|
||||
keyAlias System.getenv("BROQROLI_KEY") ?: ''
|
||||
keyPassword System.getenv("BROQROLI_KEY_PASS") ?: ''
|
||||
storePassword System.getenv("BROQROLI_PASS") ?: ''
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
if (useDebugSigningForReleaseBuild) {
|
||||
signingConfig signingConfigs.debug
|
||||
} else {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue