From 976eaba0506e78e3ae48eebd7abe37cc8a447b0f Mon Sep 17 00:00:00 2001 From: Kosh Date: Tue, 14 Mar 2017 20:20:26 +0800 Subject: [PATCH] removed an extra step from contribution. --- CONTRIBUTE.md | 1 - app/build.gradle | 27 +++++++++++++++++++------- app/src/debuggingApp/gradle.properties | 7 ------- build.gradle | 1 + debug_gradle.properties | 7 +++++++ 5 files changed, 28 insertions(+), 15 deletions(-) delete mode 100644 app/src/debuggingApp/gradle.properties create mode 100644 debug_gradle.properties diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index 7f123e85..08ffb05a 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -19,7 +19,6 @@ Before you close the project, Please read the guide below to be able to login fr - Fork the project. - Clone it to your desktop. - Open the project from Android Studio. -- Copy **gradle.properties** from folder **debuggingApp** to the root folder of the project. - Let it build & Start coding. ### Submitting PR diff --git a/app/build.gradle b/app/build.gradle index 464c2ea7..907c28b4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,14 +3,24 @@ apply plugin: 'me.tatarka.retrolambda' apply plugin: "com.neenbedankt.android-apt" apply plugin: 'com.siimkinks.sqlitemagic' apply plugin: 'com.google.firebase.firebase-crash' +apply plugin: 'com.novoda.build-properties' + +buildProperties { + notThere { + file rootProject.file('debug_gradle.properties') + } + secrets { + file rootProject.file('gradle.properties') + } +} android { signingConfigs { signing { - keyAlias ANDROID_KEY_ALIAS - keyPassword ANDROID_STORE_PASSWORD + keyAlias buildProperties.secrets['android_key_alias'].or(buildProperties.notThere['android_key_alias']).string + keyPassword buildProperties.secrets['android_store_password'].or(buildProperties.notThere['android_store_password']).string storeFile file('fastaccess-key') - storePassword ANDROID_STORE_PASSWORD + storePassword buildProperties.secrets['android_store_password'].or(buildProperties.notThere['android_store_password']).string } } compileSdkVersion 25 @@ -22,10 +32,13 @@ android { versionCode 111 versionName "1.1.1" signingConfig signingConfigs.signing - buildConfigField "String", "GITHUB_CLIENT_ID", "\"${GITHUB_CLIENT_ID}\"" - buildConfigField "String", "GITHUB_SECRET", "\"${GITHUB_SECRET}\"" - buildConfigField "String", "REDIRECT_URL", "\"${REDIRECT_URL}\"" - buildConfigField "String", "REST_URL", '"https://api.github.com/"' + buildConfigString "GITHUB_CLIENT_ID", buildProperties.secrets['github_client_id'] + .or(buildProperties.notThere['github_client_id']).string + buildConfigString "GITHUB_SECRET", buildProperties.secrets['github_secret'] + .or(buildProperties.notThere['github_secret']).string + buildConfigString "REDIRECT_URL", buildProperties.secrets['redirect_url'] + .or(buildProperties.notThere['redirect_url']).string + buildConfigField "String", "REST_URL", '"https://api.github.com/"' buildConfigField "int", "DB_VERSION", "2" } buildTypes { diff --git a/app/src/debuggingApp/gradle.properties b/app/src/debuggingApp/gradle.properties deleted file mode 100644 index 256877ef..00000000 --- a/app/src/debuggingApp/gradle.properties +++ /dev/null @@ -1,7 +0,0 @@ -org.gradle.jvmargs=-Xmx2536M -ANDROID_STORE_PASSWORD=PASSWORD -ANDROID_KEY_PASSWORD=PASSWORD -ANDROID_KEY_ALIAS=ALIAS -GITHUB_CLIENT_ID=GITHUB_CLIENT_ID -GITHUB_SECRET=GITHUB_SECRET -REDIRECT_URL=https://127.0.0.1 \ No newline at end of file diff --git a/build.gradle b/build.gradle index b07403a7..556a0543 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,7 @@ buildscript { classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2' classpath 'com.siimkinks.sqlitemagic:sqlitemagic-plugin:0.11.0' classpath 'com.google.firebase:firebase-plugins:1.0.5' + classpath 'com.novoda:gradle-build-properties-plugin:0.3' } configurations.classpath.exclude group: 'com.android.tools.external.lombok' } diff --git a/debug_gradle.properties b/debug_gradle.properties new file mode 100644 index 00000000..acc03a62 --- /dev/null +++ b/debug_gradle.properties @@ -0,0 +1,7 @@ +org.gradle.jvmargs=-Xmx2536M +android_store_password=PASSWORD +android_key_password=PASSWORD +android_key_alias=ALIAS +github_client_id=GITHUB_CLIENT_ID +github_secret=GITHUB_SECRET +redirect_url=https://127.0.0.1 \ No newline at end of file