diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-05-26 17:29:53 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-05-26 17:29:53 +0200 |
commit | 8e1748eb0ff232d972f7ade2da7093ceb3a85826 (patch) | |
tree | 6e4f394bddaea9d0a4481a43ac8d0df413e85620 | |
parent | 5895203271e3098cb4d423e953b06e6a643f97f0 (diff) |
Add signing configuration for gradle
-rw-r--r-- | build.gradle | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/build.gradle b/build.gradle index 04ade8a9..f9906dc4 100644 --- a/build.gradle +++ b/build.gradle @@ -34,20 +34,34 @@ android { instrumentTest.setRoot('tests') } + signingConfigs { + release + } + + buildTypes { release { - storeFile file("/Users/arne/software/android.keystore") - storePassword "$System.env.ICSOPENVPNSIGNPW" - keyAlias "singkey" - keyPassword "$System.env.ICSOPENVPNSIGNPW" + signingConfig signingConfigs.release } } + } + + +// ~/.gradle/gradle.properties +if (project.hasProperty('keystoreFile') && + project.hasProperty('keystorePassword') && + project.hasProperty('keystoreAliasPassword')) { + android.signingConfigs.release.storeFile = file(keystoreFile) + android.signingConfigs.release.storePassword = keystorePassword + android.signingConfigs.release.keyPassword = keystoreAliasPassword + android.signingConfigs.release.keyAlias = keystoreAlias +} else { + buildTypes.release.signingConfig = null } -//http://stackoverflow.com/questions/16683775/include-so-library-in-apk-in-android-studio +//http://stackoverflow.com/questions/16683775/include-so-library-in-apk-in-android-studio tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask -> pkgTask.jniDir new File(buildDir, 'native-libs') } -clean.dependsOn 'cleanCopyNativeLibs'
\ No newline at end of file |