From f92948d0151ffe0860ebbd2841a56e76c3b5ff9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 10 Apr 2014 20:34:16 +0200 Subject: Require Build Tools 19.0.3. --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index d9ff1fdf..e53c0f26 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'android' android { compileSdkVersion 19 - buildToolsVersion "19.0.1" + buildToolsVersion "19.0.3" defaultConfig { minSdkVersion 14 -- cgit v1.2.3 From 8aa7eabe7ca81595b307f83ddcb1079ceec6d45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 10 Apr 2014 21:32:21 +0200 Subject: Release apk signed with debug key if no keystore You have to edit a gradle.properties file with the following structure: storeFileProperty=fullPath storePasswordProperty=store password without quotation marks keyAliasProperty=key alias without quotation marks keyPasswordProperty=key password without quotation marks --- app/build.gradle | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e53c0f26..94823b02 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,32 +13,21 @@ android { } signingConfigs { - release + release { + storeFile project.hasProperty('storeFileProperty') ? file(storeFileProperty) : null + storePassword project.hasProperty('storePasswordProperty') ? storePasswordProperty : "" + keyAlias project.hasProperty('keyAliasProperty') ? keyAliasProperty : "" + keyPassword project.hasProperty('keyPasswordProperty') ? keyPasswordProperty : "" + } } buildTypes { release { runProguard true - signingConfig signingConfigs.release + signingConfig signingConfigs.release.isSigningReady() ? signingConfigs.release : signingConfigs.debug } } - if (project.hasProperty('storeFile')) { - signingConfigs.release.storeFile = new File(storeFile) - } - - if (project.hasProperty('storePassword')) { - signingConfigs.release.storePassword = storePassword - } - - if (project.hasProperty('keyAlias')) { - signingConfigs.release.keyAlias = keyAlias - } - - if (project.hasProperty('keyPassword')) { - signingConfigs.release.keyPassword = keyPassword - } - lintOptions { abortOnError false } -- cgit v1.2.3 From a6675ae98c90649f81c50288a00614a0100fb335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 10 Apr 2014 21:38:18 +0200 Subject: Build tools and gradle.properties explanation --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d3f1dc0..7ac299bd 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ the SDK and NDK to `~/dev` on a linux machine, you would add this to your path: Installable via `android` command (SDK Manager): -* Android SDK Build-tools, 19.0.1 +* Android SDK Build-tools, 19.0.3 * Android Support Repository, 4+ Finally, install a java compiler. For example: @@ -41,7 +41,16 @@ To build NDK sources, you need to issue these commands: cd .. (to get back to the project directory) ### Compiling from the command line - +#### Signed APK + +If you want to release a signed APK, you'll have to create a gradle.properties file in the project root with the following structure: + + storeFileProperty=fullPath + storePasswordProperty=store password without quotation marks + keyAliasProperty=key alias without quotation marks + keyPasswordProperty=key password without quotation marks + +#### Actual command ./gradlew build The resulting apk(s) will be in `app/build/apk`. -- cgit v1.2.3