Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make signing configuration optional. #437

Closed
Closed
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
23 changes: 12 additions & 11 deletions studio/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ apply plugin: 'com.android.application'

project.archivesBaseName = "opengpstracker"

def keystorePropertiesFile = rootProject.file("keystore.properties");
def signingProperties = new Properties()
signingProperties.load(new FileInputStream(keystorePropertiesFile))

android {
compileSdkVersion "Google Inc.:Google APIs:23"
buildToolsVersion '23.0.2'
Expand All @@ -23,13 +19,7 @@ android {
}

signingConfigs {
all {
storeFile file(signingProperties["storeFile"])
storePassword signingProperties["storePassword"]
keyAlias signingProperties["keyAlias"]
keyPassword signingProperties["keyPassword"]
}
release {}
release
}

buildTypes {
Expand Down Expand Up @@ -65,3 +55,14 @@ dependencies {
compile project(':service')
testCompile 'junit:junit:4.12'
}

def keystorePropertiesFile = rootProject.file("keystore.properties");
if (keystorePropertiesFile.exists()) {
def signingProperties = new Properties()
signingProperties.load(new FileInputStream(keystorePropertiesFile))
def release = android.signingConfigs.release
release.storeFile = file(signingProperties["storeFile"])
release.storePassword = signingProperties["storePassword"]
release.keyAlias = signingProperties["keyAlias"]
release.keyPassword = signingProperties["keyPassword"]
}