Skip to content

Instantly share code, notes, and snippets.

@westonal
Last active August 29, 2015 14:14
Show Gist options
  • Save westonal/8209d3d8990453a29c81 to your computer and use it in GitHub Desktop.
Save westonal/8209d3d8990453a29c81 to your computer and use it in GitHub Desktop.
gradle android signing and other useful configs
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.package.app"
minSdkVersion 16
targetSdkVersion 19
}
packagingOptions {
exclude 'troublesome files'
}
signingConfigs {
releaseCfg {
storeFile file("store.keystore")
storePassword System.getenv("PASSWORD") //i.e. export/set PASSWORD=MyPassword
keyAlias "Project Alias"
keyPassword System.getenv("PASSWORD")
}
}
buildTypes {
release {
signingConfig signingConfigs.releaseCfg
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
buildConfigField "String", "SETTING", "A config""
}
debug {
buildConfigField "String", "SETTING", "A settings debug value"
}
}
}
apply plugin: 'android-unit-test'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':sup-project')
testCompile 'junit:junit:4.+'
testCompile 'org.robolectric:robolectric:2.4'
testCompile 'org.mockito:mockito-core:1.+'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment