Skip to content

Commit

Permalink
build: Prepare build config for automated CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Mar 30, 2023
1 parent 753b0e8 commit 8b4afc7
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ android {
applicationVariants.all { variant ->
variant.resValue 'string', 'version_name', "Beta v${variant.versionName}"
}
signingConfigs {
signingConf {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

storeFile file(properties.getProperty('signing.file'))
storePassword properties.getProperty('signing.password')
keyAlias properties.getProperty('signing.key.alias')
keyPassword properties.getProperty('signing.key.password')
}
}
buildTypes {
development {
minifyEnabled false
Expand All @@ -42,7 +31,6 @@ android {
minifyEnabled true
shrinkResources true
resValue 'string', "app_name", "PINcredible"
signingConfig signingConfigs.signingConf
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand All @@ -63,6 +51,20 @@ android {
}
}

if (project.hasProperty('sign')) {
android {
signingConfigs {
release {
storeFile file(System.getenv('KEYSTORE_FILE'))
storePassword System.getenv('KEYSTORE_PASSWD')
keyAlias System.getenv('KEYSTORE_KEY_ALIAS')
keyPassword System.getenv('KEYSTORE_KEY_PASSWD')
}
}
}
android.buildTypes.release.signingConfig android.signingConfigs.release
}

dependencies {
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
Expand Down

0 comments on commit 8b4afc7

Please sign in to comment.