Add keystore and build on sign on release
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@
|
|||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
.cxx
|
.cxx
|
||||||
.idea
|
.idea
|
||||||
|
keystore.properties
|
||||||
|
|||||||
BIN
AndroidKey
Normal file
BIN
AndroidKey
Normal file
Binary file not shown.
@@ -1,6 +1,16 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
|
// Create a variable called keystorePropertiesFile, and initialize it to your
|
||||||
|
// keystore.properties file, in the rootProject folder.
|
||||||
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||||
|
|
||||||
|
// Initialize a new Properties() object called keystoreProperties.
|
||||||
|
def keystoreProperties = new Properties()
|
||||||
|
|
||||||
|
// Load your keystore.properties file into the keystoreProperties object.
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 32
|
||||||
|
|
||||||
@@ -13,12 +23,20 @@ android {
|
|||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
signingConfigs {
|
||||||
|
create("release") {
|
||||||
|
keyAlias = keystoreProperties["keyAlias"]
|
||||||
|
keyPassword = keystoreProperties["keyPassword"]
|
||||||
|
storeFile = file(keystoreProperties["storeFile"])
|
||||||
|
storePassword = keystoreProperties["storePassword"]
|
||||||
|
}
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user