|
| 1 | +import groovy.json.JsonSlurper |
| 2 | + |
1 | 3 | plugins { |
2 | 4 | id 'com.android.application' |
3 | | - id 'kotlin-android' |
4 | | - id 'com.google.devtools.ksp' version '1.8.20-1.0.10' |
| 5 | + id 'org.jetbrains.kotlin.android' |
| 6 | + id 'com.google.devtools.ksp' |
5 | 7 | } |
6 | 8 |
|
7 | 9 | android { |
8 | | - compileSdk 33 |
9 | | - |
10 | 10 | signingConfigs { |
11 | | - debug { |
12 | | - storeFile file('../keystore/public') |
13 | | - storePassword '123456' |
14 | | - keyAlias 'public' |
15 | | - keyPassword '123456' |
| 11 | + universal { |
| 12 | + def dirPath = rootProject.ext.app.signingConfigs.secretConfigsDirPath |
| 13 | + def fileName = rootProject.ext.app.signingConfigs.secretConfigsFileName |
| 14 | + def configs = new JsonSlurper().parse(file("${dirPath}/${fileName}")) |
| 15 | + keyAlias configs.keyAlias |
| 16 | + keyPassword configs.keyPassword |
| 17 | + storeFile file("${dirPath}/${configs.storeFileName}") |
| 18 | + storePassword configs.storePassword |
16 | 19 | v1SigningEnabled true |
17 | 20 | v2SigningEnabled true |
18 | 21 | } |
19 | 22 | } |
20 | 23 |
|
| 24 | + namespace 'com.fankes.miui.notify' |
| 25 | + compileSdk rootProject.ext.android.compileSdk |
| 26 | + |
21 | 27 | defaultConfig { |
22 | | - applicationId "com.fankes.miui.notify" |
23 | | - minSdk 28 |
24 | | - targetSdk 33 |
25 | | - versionCode rootProject.ext.appVersionCode |
26 | | - versionName rootProject.ext.appVersionName |
| 28 | + applicationId 'com.fankes.miui.notify' |
27 | 29 |
|
28 | | - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 30 | + minSdk rootProject.ext.android.minSdk |
| 31 | + targetSdk rootProject.ext.android.targetSdk |
| 32 | + |
| 33 | + versionCode rootProject.ext.app.versionCode |
| 34 | + versionName rootProject.ext.app.versionName |
| 35 | + |
| 36 | + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' |
29 | 37 | } |
30 | 38 |
|
31 | 39 | buildTypes { |
| 40 | + debug { |
| 41 | + minifyEnabled false |
| 42 | + signingConfig signingConfigs.universal |
| 43 | + } |
32 | 44 | release { |
33 | | - minifyEnabled rootProject.ext.enableR8 |
34 | | - shrinkResources rootProject.ext.enableR8 |
35 | | - zipAlignEnabled rootProject.ext.enableR8 |
36 | | - signingConfig signingConfigs.debug |
| 45 | + minifyEnabled true |
| 46 | + shrinkResources true |
| 47 | + zipAlignEnabled true |
| 48 | + signingConfig signingConfigs.universal |
37 | 49 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
38 | 50 | } |
39 | 51 | } |
|
0 commit comments