添加秘钥配置
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
|||||||
/build
|
/build
|
||||||
/.gradle
|
/.gradle
|
||||||
|
appkey.jks
|
||||||
|
signing.properties
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
def keystorePropertiesFile = rootProject.file("signing.properties")
|
||||||
|
def keystoreProperties = new Properties()
|
||||||
|
|
||||||
|
try {
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
} catch (Exception e) {
|
||||||
|
keystoreProperties = null
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion 30
|
||||||
buildToolsVersion "33.0.0"
|
buildToolsVersion "33.0.0"
|
||||||
@@ -7,15 +16,35 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.gallery"
|
applicationId "cc.winboll.gallery"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 26
|
targetSdkVersion 30
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
if (keystoreProperties != null) {
|
||||||
|
storeFile rootProject.file(keystoreProperties["STORE_FILE"])
|
||||||
|
storePassword keystoreProperties["STORE_PASSWORD"]
|
||||||
|
keyAlias keystoreProperties["KEY_ALIAS"]
|
||||||
|
keyPassword keystoreProperties["KEY_PASSWORD"]
|
||||||
|
} else {
|
||||||
|
storeFile rootProject.file("appkey.jks")
|
||||||
|
storePassword "appkey123"
|
||||||
|
keyAlias "winboll.cc"
|
||||||
|
keyPassword "appkey123"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
|
signingConfig signingConfigs.release
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
debug {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
|
|||||||
Reference in New Issue
Block a user