|
|
@@ -98,13 +98,28 @@ android { |
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion |
|
|
|
buildToolsVersion rootProject.ext.buildToolsVersion |
|
|
|
|
|
|
|
def getVersionCode = { -> |
|
|
|
return project.hasProperty('versionCode') ? Integer.parseInt(project.versionCode) : 1 |
|
|
|
} |
|
|
|
|
|
|
|
def getVersionName = { -> |
|
|
|
return project.hasProperty('versionName') ? project.versionName : "1.0" |
|
|
|
} |
|
|
|
|
|
|
|
defaultConfig { |
|
|
|
applicationId "com.screenad" |
|
|
|
minSdkVersion rootProject.ext.minSdkVersion |
|
|
|
targetSdkVersion rootProject.ext.targetSdkVersion |
|
|
|
versionCode 1 |
|
|
|
versionName "1.0" |
|
|
|
versionCode = getVersionCode() |
|
|
|
versionName getVersionName() |
|
|
|
} |
|
|
|
|
|
|
|
android.applicationVariants.all { variant -> |
|
|
|
variant.outputs.all { |
|
|
|
outputFileName = "screenad_" + variant.buildType.name + "_v" + defaultConfig.versionName + ".apk" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
splits { |
|
|
|
abi { |
|
|
|
reset() |
|
|
@@ -114,7 +129,15 @@ android { |
|
|
|
} |
|
|
|
} |
|
|
|
buildTypes { |
|
|
|
debug { |
|
|
|
buildConfigField "String", "API_HOST", "\"https://mall.youlane.cn/\"" |
|
|
|
buildConfigField "String", "CODEPUSH_HOST", "\"http://202.165.179.86:3333/\"" |
|
|
|
buildConfigField "String", "CODEPUSH_KEY", "\"8snO1yoHlvhEtBjr02zTr3g1comw4ksvOXqog\"" |
|
|
|
} |
|
|
|
release { |
|
|
|
buildConfigField "String", "API_HOST", "\"https://admin.malls.iformall.com/\"" |
|
|
|
buildConfigField "String", "CODEPUSH_HOST", "\"http://202.165.179.86:3333/\"" |
|
|
|
buildConfigField "String", "CODEPUSH_KEY", "\"9rYZYySFD0ryN5wCD9YmjJkT55Kf4ksvOXqog\"" |
|
|
|
minifyEnabled enableProguardInReleaseBuilds |
|
|
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" |
|
|
|
} |
|
|
|