Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "com.diffplug.gradle.spotless" version "3.23.1"
id "com.github.b3er.local.properties" version "1.1"
}

def rootConfiguration = {}
Expand All @@ -15,6 +16,8 @@ def YOUTUBE_API_KEY = System.getenv('YOUTUBE_API_KEY') ?: "YOUR_API_KEY"
//noinspection SpellCheckingInspection
def MAPBOX_API_KEY = '"'+System.getenv('MAPBOX_API_KEY')+'"' ?: '"DEFAULT"'

def LOCAL_KEY_PRESENT = project.hasProperty('SIGNING_KEY_FILE') && rootProject.file(SIGNING_KEY_FILE).exists()

android {
compileSdkVersion rootConfiguration.compileSdkVersion

Expand All @@ -35,12 +38,34 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

signingConfigs {
if (CIRCLE_BUILD) {
release {
storeFile KEYSTORE_FILE
storePassword System.getenv("STORE_PASS")
keyAlias System.getenv("ALIAS")
keyPassword System.getenv("KEY_PASS")
}
} else if (LOCAL_KEY_PRESENT) {
release {
storeFile rootProject.file(SIGNING_KEY_FILE)
storePassword STORE_PASS
keyAlias ALIAS
keyPassword KEY_PASS
}
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "SPEAKER_BASE_URL", '"http://10.0.0.1:5000"'
buildConfigField "String", "MAPBOX_API_KEY", MAPBOX_API_KEY

if (LOCAL_KEY_PRESENT || CIRCLE_BUILD)
signingConfig signingConfigs.release
}

debug {
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ allprojects {
repositories {
google()
}
}

ext {
KEYSTORE_FILE = rootProject.file('scripts/key.jks')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been exec/key.jks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the open event repo, there is a folder called exec, inside which all the files were kept. But here we have a folder named scripts, where such files are kept. So I used scripts there.

Can you please tell what's the use of the above statement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are saying completely opposite things. open event repo has scripts folder and that's why scripts was used and susi has exec folder. You didn't change anything. You just copied. You should have changed this to exec

CIRCLE_BUILD = System.getenv("CIRCLECI") == "true" && KEYSTORE_FILE.exists()
}
}
6 changes: 3 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
- run:
name: spotless check
command: ./gradlew spotlessCheck
- run:
name: Run Tests
command: ./gradlew build
- run:
command:
bash exec/prep-key.sh
- run:
name: Run Tests
command: ./gradlew build
- run:
command:
bash exec/apk-gen.sh
Expand Down