add build signing information
authorChristian Weiske <cweiske@cweiske.de>
Thu, 24 Mar 2016 20:23:54 +0000 (21:23 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 24 Mar 2016 20:23:54 +0000 (21:23 +0100)
.gitignore
README.rst
build.gradle

index 1b95ae2418bacb231126811a145f3873348b678d..5e1ebd066784462ac702220f3a072b900bfd5329 100644 (file)
@@ -9,3 +9,4 @@
 /gen
 /README.html
 /dist
+/gradle.properties
index 5f55d6af9c165c182747373c606a0b7d17f5f3cb..f6d6cea8d15f4a94ad71b436d4040f3b644e17a2 100644 (file)
@@ -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
index e297e4aea8940896b50e5b353d0f331084ed6cac..8ac6cb0d6c42122abe4c165ceeeba718a35037a3 100644 (file)
@@ -33,3 +33,8 @@ android {
         }
     }
 }
+
+if (project.hasProperty("signingconfigfile")
+    && new File(project.property("signingconfigfile")).exists()) {
+    apply from: project.property("signingconfigfile");
+}