Commit 6fffd0fe8c0bb564f5d6cc5e60b67a9b27565ad2

Authored by 朱显松
1 parent 149c7a66

更新编译文件

Showing 1 changed file with 17 additions and 1 deletions
app/build.gradle
@@ -3,6 +3,11 @@ apply plugin: 'com.android.application' @@ -3,6 +3,11 @@ apply plugin: 'com.android.application'
3 android { 3 android {
4 compileSdkVersion 26 4 compileSdkVersion 26
5 buildToolsVersion "26.0.0" 5 buildToolsVersion "26.0.0"
  6 +
  7 + dexOptions {
  8 + javaMaxHeapSize "4g"
  9 + }
  10 +
6 defaultConfig { 11 defaultConfig {
7 applicationId "com.cnlive.gundam" 12 applicationId "com.cnlive.gundam"
8 minSdkVersion 16 13 minSdkVersion 16
@@ -26,15 +31,26 @@ android { @@ -26,15 +31,26 @@ android {
26 } 31 }
27 32
28 buildTypes { 33 buildTypes {
29 - debug{ 34 + debug {
  35 + applicationIdSuffix ".debug"
30 signingConfig signingConfigs.myConfig 36 signingConfig signingConfigs.myConfig
  37 + zipAlignEnabled true
31 } 38 }
32 release { 39 release {
33 minifyEnabled false 40 minifyEnabled false
34 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 41 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
35 signingConfig signingConfigs.myConfig 42 signingConfig signingConfigs.myConfig
  43 + zipAlignEnabled true
  44 + v2SigningEnabled false
36 } 45 }
37 } 46 }
  47 +
  48 + applicationVariants.all { variant ->
  49 + def file = variant.outputs[0].outputFile
  50 + def name = "CNliveApp_" + defaultConfig.versionName + "_" + variant.buildType.name + ".apk";
  51 + variant.outputs[0].outputFile = new File(file.parent, name)
  52 + }
  53 +
38 } 54 }
39 55
40 dependencies { 56 dependencies {