更新应用密钥配置

This commit is contained in:
2026-03-15 15:06:08 +08:00
parent 11a5cc020e
commit a0c2d12eeb

View File

@@ -1,6 +1,13 @@
plugins { plugins {
id "com.android.application" id "com.android.application"
} }
// 读取秘钥配置文件
//
def keyProps = new Properties()
def keyPropsFile = rootProject.file('appkey.keystore')
if (keyPropsFile.exists()) {
keyProps.load(new FileInputStream(keyPropsFile))
}
ext { ext {
// The packageVariant defines the bootstrap variant that will be included in the app APK. // The packageVariant defines the bootstrap variant that will be included in the app APK.
@@ -74,25 +81,38 @@ android {
} }
} }
} }
// 配置签名
signingConfigs { signingConfigs {
winboll {
keyAlias keyProps['keyAlias']
keyPassword keyProps['keyPassword']
storeFile keyProps['storeFile'] ? file(keyProps['storeFile']) : null
storePassword keyProps['storePassword']
}
}
/*signingConfigs {
debug { debug {
storeFile file('testkey_untrusted.jks') storeFile file('testkey_untrusted.jks')
keyAlias 'alias' keyAlias 'alias'
storePassword 'xrj45yWGLbsO7W0v' storePassword 'xrj45yWGLbsO7W0v'
keyPassword 'xrj45yWGLbsO7W0v' keyPassword 'xrj45yWGLbsO7W0v'
} }
} }*/
buildTypes { buildTypes {
release { release {
signingConfig signingConfigs.winboll
minifyEnabled true minifyEnabled true
shrinkResources false // Reproducible builds shrinkResources false // Reproducible builds
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
debug { debug {
signingConfig signingConfigs.debug signingConfig signingConfigs.winboll
//signingConfig signingConfigs.debug
} }
} }