Skip to content

Commit

Permalink
Revert "Make Gradle sign the release apk (#988)"
Browse files Browse the repository at this point in the history
This reverts commit 8acac24.
  • Loading branch information
SyncedSynapse authored Nov 18, 2023
1 parent 8acac24 commit 3cc98bf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
22 changes: 16 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@ android {
supportedLocales.join("\",\"")+"\"}"
}

File keystoreFile = file('keystore.properties')

signingConfigs {
release {
if (System.getenv("KODI_ANDROID_STORE_FILE") != null) {
keyAlias System.getenv("KODI_ANDROID_KEY_ALIAS")
keyPassword System.getenv("KODI_ANDROID_KEY_PASSWORD")
storeFile file(System.getenv("KODI_ANDROID_STORE_FILE"))
storePassword System.getenv("KODI_ANDROID_STORE_PASSWORD")
if (keystoreFile.exists()) {
Properties keyProps = new Properties()
keyProps.load(new FileInputStream(keystoreFile))

storeFile file(keyProps["store"])
keyAlias keyProps["alias"]
storePassword keyProps["storePass"]
keyPassword keyProps["pass"]
}
}
}
Expand All @@ -46,9 +51,14 @@ android {
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
if (System.getenv("KODI_ANDROID_STORE_FILE") != null) {
if (keystoreFile.exists()) {
signingConfig signingConfigs.release
}
minifyEnabled true
Expand Down
5 changes: 2 additions & 3 deletions tools/jenkins/buildsteps/package
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}

# Signing done by Gradle, no need to run separate sign step
#$RUN_SIGNSTEP
$RUN_SIGNSTEP

function getBranchName ()
{
Expand Down Expand Up @@ -53,4 +52,4 @@ function getBuildRevDateStr ()
#rename for upload
#e.x. kore-20130314-8c2fb31.apk.
UPLOAD_FILENAME="kore-$(getBuildRevDateStr).apk"
cd $WORKSPACE;mv app/build/outputs/apk/release/kore-release.apk $UPLOAD_FILENAME
cd $WORKSPACE;mv kore-release.apk $UPLOAD_FILENAME

0 comments on commit 3cc98bf

Please sign in to comment.