From 1f3b856d4d6e3814dfc1655c53ef8d348fca9687 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 24 Mar 2016 21:23:54 +0100 Subject: [PATCH] add build signing information --- .gitignore | 1 + README.rst | 22 ++++++++++++++++++++++ build.gradle | 5 +++++ 3 files changed, 28 insertions(+) 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"); +} -- 2.30.2