Added proper gradle release build.

This commit is contained in:
Felix Ableitner 2014-07-24 19:07:18 +02:00
parent c9b078cf62
commit 80a8387090
3 changed files with 41 additions and 1 deletions

View file

@ -61,6 +61,8 @@
</content>
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="appcompat-v7-19.1.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-19.1.0" level="project" />
<orderEntry type="module" module-name="libsuperuser" exported="" />
</component>
</module>

View file

@ -1,4 +1,26 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.alexvasilkov:android_sign:0.2+'
}
}
import java.util.regex.Pattern
apply plugin: 'com.android.application'
apply plugin: 'android_sign'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:appcompat-v7:19.1.+'
}
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
@ -14,11 +36,27 @@ android {
testFunctionalTest true
}
signingConfigs {
release {
// Android Studio does not pass environment variables.
// This means you have to use the command line for release builds.
def ks = System.getenv("KEYSTORE")
def ka = System.getenv("KEY_ALIAS")
if (ks != null && ka != null) {
storeFile file(ks)
keyAlias ka
}
}
}
buildTypes {
debug {
applicationIdSuffix ".debug"
debuggable true
}
release {
signingConfig signingConfigs.release
}
}
}

View file

@ -16,4 +16,4 @@ allprojects {
repositories {
mavenCentral()
}
}
}