Skip to content

Commit

Permalink
Merge pull request #1052 from mikepenz/feature/rework_signing_setup
Browse files Browse the repository at this point in the history
Improve release signing logic
  • Loading branch information
mikepenz authored Jan 5, 2025
2 parents 993b79b + 3702696 commit c0b3af0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 26 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
os: [macos-14, ubuntu-latest, windows-latest]
os: [ macos-14, ubuntu-latest, windows-latest ]

runs-on: ${{matrix.os}}

Expand Down Expand Up @@ -153,13 +153,10 @@ jobs:
run: |
echo "${{ secrets.KEYSTORE }}" > opensource.jks.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch "opensource.jks.asc" > "app/opensource.jks"
echo "${{ secrets.SIGNING_GRADLE }}" > signing.gradle.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch "signing.gradle.asc" > "app/signing.gradle"
echo "openSource.signing.file=signing.gradle" >> local.properties
- name: Build Release App
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew app:assembleStaging app:assembleRelease app:bundleRelease
run: ./gradlew app:assembleStaging app:assembleRelease app:bundleRelease -P"com.mikepenz.android.signing.enabled"="true" -P"com.mikepenz.android.signing.storeFile"="app/opensource.jks" -P"com.mikepenz.android.signing.storePassword"="${{ secrets.STORE_PASSWORD }}" -P"com.mikepenz.android.signing.keyAlias"="${{ secrets.KEY_ALIAS }}" -P"com.mikepenz.android.signing.keyPassword"="${{ secrets.KEY_PASSWORD }}"

- name: Collect artifacts
run: |
Expand Down
8 changes: 2 additions & 6 deletions aboutlibraries-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ kotlin {
api(libs.kotlinx.collections)
}
}
val multiplatformMain by creating {
dependsOn(commonMain)
}
val multiplatformMain by creating
val jvmMain by getting {
dependsOn(multiplatformMain)
}
Expand All @@ -32,9 +30,7 @@ kotlin {
val jsMain by getting {
dependsOn(multiplatformMain)
}
val androidMain by getting {
dependsOn(commonMain)
}
val androidMain by getting
val wasmJsMain by getting {
dependsOn(multiplatformMain)
}
Expand Down
15 changes: 1 addition & 14 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import com.mikepenz.aboutlibraries.plugin.DuplicateMode
import com.mikepenz.aboutlibraries.plugin.DuplicateRule
import com.mikepenz.aboutlibraries.plugin.StrictMode
import com.mikepenz.gradle.utils.readPropertyOrElse

plugins {
kotlin("android")
id("com.mikepenz.convention.android-application")
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.android-application")
id("com.mikepenz.convention.compose")
id("com.mikepenz.aboutlibraries.plugin")
}

val openSourceSigningFile: String? = readPropertyOrElse("openSource.signing.file")
if (openSourceSigningFile != null) {
apply(from = openSourceSigningFile)
}

android {
namespace = "com.mikepenz.aboutlibraries.sample"

Expand All @@ -25,17 +18,11 @@ android {
}

buildTypes {
getByName("debug") {
signingConfig = signingConfigs.findByName("debug")
}
create("staging") {
signingConfig = signingConfigs.findByName("release")
applicationIdSuffix = ".debugStaging"
matchingFallbacks.add("debug")
}
getByName("release") {
signingConfig = signingConfigs.findByName("release")
}
}

productFlavors {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
conventionPlugin = "0.1.1"
conventionPlugin = "0.1.3"
# kotlin
kotlinxSerialization = "1.7.3"
kotlinxCollections = "0.3.8"
Expand Down

0 comments on commit c0b3af0

Please sign in to comment.