Skip to content

Commit

Permalink
fix: update default opensqueeze keystores
Browse files Browse the repository at this point in the history
  • Loading branch information
bensandee committed Mar 9, 2024
1 parent a644e3e commit d4addc0
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ jobs:
- name: Setting up keystores
run: |
echo ${{ secrets.RELEASE_KEYSTORE_BASE64 }} | base64 --decode > app/release_keystore.jks
echo ${{ secrets.DEBUG_KEYSTORE_BASE64 }} | base64 --decode > app/debug_keystore.jks
echo ${{ secrets.RELEASE_KEYSTORE_BASE64 }} | base64 --decode > app/keystores/opensqueeze_release.jks
echo ${{ secrets.DEBUG_KEYSTORE_BASE64 }} | base64 --decode > app/keystores/opensqueeze_debug.jks
- run: echo Building with version ${{ env.next_version_name }}, build number ${{ env.next_build_number }}

Expand All @@ -82,7 +82,7 @@ jobs:
-PversionName=${{ env.next_version_name }}
-PbuildNumber=${{ env.next_build_number }}
-PreleaseKeystorePassword=${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
-PdebugKeystore=debug_keystore.jks
-PdebugKeystorePassword=${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
build
- name: Test Report
Expand Down
3 changes: 1 addition & 2 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
build/*
keystores/*
build/*
43 changes: 27 additions & 16 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release {
storeFile file('keystores/opensqueeze_release.jks')
storePassword "opensqueeze"
keyAlias "android"
keyPassword "opensqueeze"
}
debug {
storeFile file('keystores/opensqueeze_debug.jks')
storePassword "opensqueeze"
keyAlias "android"
keyPassword "opensqueeze"
}
}

buildTypes {
release {
minifyEnabled true
Expand All @@ -52,10 +67,14 @@ android {
proguardFile 'proguard-guava.pro'
proguardFile 'proguard-jackson.pro'
proguardFile 'proguard-otto.pro'

signingConfig signingConfigs.release
}

debug {
multiDexEnabled true

signingConfig signingConfigs.debug
}
}

Expand All @@ -75,26 +94,18 @@ android {
jvmTarget = JavaVersion.VERSION_17
}

signingConfigs {
release {
storeFile file('keystores/opensqueeze_release.jks')
keyAlias 'signing'
}
debug {
storeFile file('keystores/opensqueeze_debug.jks')
}
}
lint {
abortOnError true
}

// enable release signing if we have password
if (project.hasProperty('openSqueezeReleaseStorePassword')) {
signingConfigs.release.storePassword = openSqueezeReleaseStorePassword
signingConfigs.release.keyPassword = openSqueezeReleaseStorePassword

// actually set the config here
buildTypes.release.signingConfig = signingConfigs.release
// override the password if we supply it
if (project.hasProperty('releaseKeystorePassword')) {
signingConfigs.release.storePassword = releaseKeystorePassword
signingConfigs.release.keyPassword = releaseKeystorePassword
}
if (project.hasProperty('debugKeystorePassword')) {
signingConfigs.debug.storePassword = debugKeystorePassword
signingConfigs.debug.keyPassword = debugKeystorePassword
}
}

Expand Down
4 changes: 4 additions & 0 deletions app/keystores/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
These keystores are for development purposes only and are not used for any official OpenSqueeze builds.
They are here solely as a convenience to any develop trying to build OpenSqueeze.

The passwords for these keystores and the contained aliases are all 'opensqueeze'.
Binary file added app/keystores/opensqueeze_debug.jks
Binary file not shown.
Binary file added app/keystores/opensqueeze_release.jks
Binary file not shown.

0 comments on commit d4addc0

Please sign in to comment.