From: Christian Weiske Date: Thu, 24 Mar 2016 20:23:54 +0000 (+0100) Subject: add build signing information X-Git-Tag: v1.0.0~2 X-Git-Url: https://git.cweiske.de/headphoneindicator.git/commitdiff_plain/1f3b856d4d6e3814dfc1655c53ef8d348fca9687?hp=34b8713871c847a5311661e5fcfbbc3e8b22a4fb add build signing information --- diff --git a/.gitignore b/.gitignore index 1b95ae2..5e1ebd0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /gen /README.html /dist +/gradle.properties diff --git a/README.rst b/README.rst index 5f55d6a..f6d6cea 100644 --- a/README.rst +++ b/README.rst @@ -41,6 +41,28 @@ Building $ ./gradlew build +Note that AndroidStudio 1.5.1 does not detect the gradle configuration correctly +and produces ``.apk`` files much larger than necessary, with duplicated files. + +``gradlew`` on command line does it correctly, though. + + +Releasing +========= +Build it normally, then sign the generated package file:: + + $ ./gradlew assembleRelease + +To sign the release with your key, put the path to the signing configuration +file into ``gradle.properties``:: + + signingconfigfile=/path/to/signing-config.gradle + +The signing configuration file should look like shown in +`Handling signing configs with Gradle`__ + +__ https://www.timroes.de/2013/09/22/handling-signing-configs-with-gradle/ + ========================= About headphone indicator diff --git a/build.gradle b/build.gradle index e297e4a..8ac6cb0 100644 --- a/build.gradle +++ b/build.gradle @@ -33,3 +33,8 @@ android { } } } + +if (project.hasProperty("signingconfigfile") + && new File(project.property("signingconfigfile")).exists()) { + apply from: project.property("signingconfigfile"); +}