Skip to content

Commit

Permalink
signing config
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Apr 11, 2020
1 parent 29485d5 commit 8360d50
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ build/
app/google-services.json

app/prod/release/output.json
keystore.jks
/app/keystore.jks
/app/keystore.properties

/ar/*.png
/app/prod
/captures
Expand Down
17 changes: 17 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,28 @@ extensions.findByType(BaseExtension::class.java)!!.apply {
}
}

val f = project.file("keystore.properties")
signingConfigs {
val props = Properties()
if (f.exists()) {
props.load(f.reader())
}
create("release") {
keyAlias = props.getProperty("keyAlias")
keyPassword = props.getProperty("keyAliasPassword")
storeFile = project.file("keystore.jks")
storePassword = props.getProperty("keyAliasPassword")
}
}

buildTypes {
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
if (f.exists()) {
signingConfig = signingConfigs.getByName("release")
}
}
}

Expand Down
6 changes: 1 addition & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@
<meta-data
android:name="google_analytics_adid_collection_enabled"
android:value="false"/>

<meta-data
android:name="com.google.ar.core"
android:value="optional"/>


<activity
android:name=".ui.activity.MainActivity"
android:configChanges="orientation|screenSize"
Expand Down

0 comments on commit 8360d50

Please sign in to comment.