Remove the need of creating extra files to build

This commit is contained in:
Synced Synapse 2015-03-04 19:01:58 +00:00
parent 87bc1483ed
commit 4d7a945c53
2 changed files with 19 additions and 14 deletions

View File

@ -9,12 +9,7 @@ Kore is a simple and easy to use Kodi/XBMC remote.
Building
---------
Git pull should get you almost all you need, as long as you have a working [Android build system][4]
You'll need to create the following files:
1. `gradle.properties`, with the value `IAP_KEY` set to something (this is used for the in-app purchase).
2. `app/keystore.properties` with the values `store`, `alias`, `pass`, `storePass` set. This is for signing the release build. Alternatively, comment the `signingConfigs` in `app/build.gradle`.
Git pull should get you almost everything you need, as long as you have a working [Android build system][4]
Credits

View File

@ -11,18 +11,26 @@ android {
versionCode 7
versionName "1.1.0"
buildConfigField("String", "IAP_KEY", "\"${rootProject.property("IAP_KEY")}\"")
if(rootProject.hasProperty("IAP_KEY")) {
buildConfigField("String", "IAP_KEY", "\"${rootProject.property("IAP_KEY")}\"")
} else {
buildConfigField("String", "IAP_KEY", "\"\"")
}
}
File keystoreFile = file('keystore.properties')
signingConfigs {
release {
def Properties keyProps = new Properties()
keyProps.load(new FileInputStream(file('keystore.properties')))
if (keystoreFile.exists()) {
def Properties keyProps = new Properties()
keyProps.load(new FileInputStream(keystoreFile))
storeFile file(keyProps["store"])
keyAlias keyProps["alias"]
storePassword keyProps["storePass"]
keyPassword keyProps["pass"]
storeFile file(keyProps["store"])
keyAlias keyProps["alias"]
storePassword keyProps["storePass"]
keyPassword keyProps["pass"]
}
}
}
@ -33,7 +41,9 @@ android {
// }
release {
signingConfig signingConfigs.release
if (keystoreFile.exists()) {
signingConfig signingConfigs.release
}
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}