@@ -21,9 +21,12 @@ android {
21
21
}
22
22
23
23
buildTypes {
24
+ debug {
25
+ minifyEnabled false
26
+ proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
27
+ }
24
28
release {
25
29
minifyEnabled true
26
- consumerProguardFiles ' proguard-rules.pro'
27
30
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
28
31
}
29
32
}
@@ -45,7 +48,7 @@ private String getSuffix() {
45
48
String [] splits = project. name. split(" -" )
46
49
String suffix = " "
47
50
if (splits. length == 2 ) {
48
- suffix = " . " + splits[0 ]
51
+ suffix = " _ " + splits[0 ]
49
52
}
50
53
return suffix
51
54
}
@@ -61,7 +64,7 @@ def configSigning(Project pro) {
61
64
properties. load(new FileInputStream (signPropertiesFile))
62
65
signingConfigs {
63
66
release {
64
- storeFile file( properties[' keystore' ])
67
+ storeFile new File (signPropertiesFile . getParent(), properties[' keystore' ])
65
68
storePassword properties[' storePassword' ]
66
69
keyAlias properties[' keyAlias' ]
67
70
keyPassword properties[' keyPassword' ]
@@ -75,9 +78,11 @@ def configSigning(Project pro) {
75
78
def configApkName (Project pro ) {
76
79
pro. android. applicationVariants. all { variant ->
77
80
if (variant. buildType. name != " debug" ) {
78
- variant. getPackageApplication(). outputDirectory = new File (project . rootDir. absolutePath + " /apk" )
81
+ variant. getPackageApplication(). outputDirectory = new File (" ${ rootDir.path } /apk" )
79
82
variant. getPackageApplication(). outputScope. apkDatas. forEach { apkData ->
80
- apkData. outputFileName = " util_" + variant. versionName. replace(" ." , " _" ) + " .apk"
83
+ apkData. outputFileName = " util" + suffix +
84
+ " _" + variant. versionName. replace(" ." , " _" ) +
85
+ " .apk"
81
86
}
82
87
}
83
88
}
0 commit comments