Skip to content

Instantly share code, notes, and snippets.

@Garretthh07
Created April 13, 2016 16:17
Show Gist options
  • Save Garretthh07/81b3e5d200e51ba71526cbe80ebd45c5 to your computer and use it in GitHub Desktop.
Save Garretthh07/81b3e5d200e51ba71526cbe80ebd45c5 to your computer and use it in GitHub Desktop.
build.gradle
apply plugin: 'com.android.application'
def releaseTime() {
return new Date().format("yyyy-MM-dd", java.util.TimeZone.getTimeZone("UTC"));
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.shunzhang.happybirthday"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
signingConfigs {
debug {
// No Debug Config
}
release {
storeFile file("D:/keystore/shunzhang.keystore");
keyAlias "release";
keyPassword "a123456";
storePassword "a123456";
}
}
buildTypes {
release {
buildConfigField "boolean", "LOG_DEBUG", "false"
signingConfig signingConfigs.release;
zipAlignEnabled true
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = "JustJava_v${defaultConfig.versionName}_${releaseTime()}_${variant.productFlavors[0].name}.apk"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}
}
productFlavors {
Official {
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
}
@Garretthh07
Copy link
Author

commod: gradlew aOfficial for windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment