File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed
Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ android {
2020 minSdk = 9
2121 targetSdk = 36
2222 versionCode = 1
23- versionName = " 0.1.0(内部体验版) "
23+ versionName = " 0.1.0"
2424 }
25+
2526 val localSigningConfig = if (rootProject.file(" keystore.properties" ).exists()) {
2627 val keystoreProperties = Properties ().apply { load(rootProject.file(" keystore.properties" ).inputStream()) }
2728 signingConfigs.create(" local" ) {
@@ -33,12 +34,35 @@ android {
3334 } else {
3435 signingConfigs.getByName(" debug" )
3536 }
37+
38+ signingConfigs {
39+ create(" release" ) {
40+ if (rootProject.file(" keystore.properties" ).exists()) {
41+ Properties ().apply {
42+ load(rootProject.file(" keystore.properties" ).inputStream())
43+ }.let {
44+ storeFile = file(it[" storeFile" ] as String )
45+ storePassword = it[" storePassword" ] as String
46+ keyAlias = it[" keyAlias" ] as String
47+ keyPassword = it[" keyPassword" ] as String
48+ }
49+ } else {
50+ signingConfigs.getByName(" debug" ).let {
51+ storeFile = it.storeFile
52+ storePassword = it.storePassword
53+ keyAlias = it.keyAlias
54+ keyPassword = it.keyPassword
55+ }
56+ }
57+ }
58+ }
59+
3660 buildTypes {
3761 release {
3862 isMinifyEnabled = true
3963 isShrinkResources = true
4064 proguardFiles(getDefaultProguardFile(" proguard-android-optimize.txt" ), " proguard-rules.pro" )
41- signingConfig = localSigningConfig
65+ signingConfig = signingConfigs.getByName( " release " )
4266 }
4367 debug {
4468 applicationIdSuffix = " .debug"
You can’t perform that action at this time.
0 commit comments