signing for android builds + ci android
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: Android CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
RELEASE_SIGN_KEY_ALIAS: ${{ secrets.RELEASE_SIGN_KEY_ALIAS }}
|
||||
RELEASE_SIGN_KEY_PASSWORD: ${{ secrets.RELEASE_SIGN_KEY_PASSWORD }}
|
||||
|
||||
jobs:
|
||||
build_apk_aab:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build artifacts
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: gradle
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build and sign debug APKs
|
||||
run: ./gradlew assembleDebug
|
||||
|
||||
- name: Upload debug APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: app-debug.apk
|
||||
path: composeApp/build/outputs/apk/debug/composeApp-debug.apk
|
||||
|
||||
- name: Build and sign release APKs
|
||||
run: ./gradlew assembleRelease
|
||||
|
||||
- name: Upload release APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: app-release.apk
|
||||
path: composeApp/build/outputs/apk/release/composeApp-release.apk
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Docker
|
||||
name: Wasm
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
+1
-1
@@ -1,5 +1,4 @@
|
||||
|
||||
*.iml
|
||||
.gradle
|
||||
.idea
|
||||
.kotlin
|
||||
@@ -45,3 +44,4 @@ google-services.json
|
||||
|
||||
# Android Profiling
|
||||
*.hprof
|
||||
/composeApp/src/androidMain/keystore/keystore.properties
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.multiplatform)
|
||||
@@ -140,7 +141,7 @@ android {
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
|
||||
applicationId = "dev.meloda.overseerr.androidApp"
|
||||
applicationId = "dev.meloda.overseerr"
|
||||
versionCode = 1
|
||||
versionName = "1.0.0"
|
||||
|
||||
@@ -157,8 +158,36 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
val keystoreProperties = Properties()
|
||||
val keystorePropertiesFile = file("./src/androidMain/keystore/keystore.properties")
|
||||
|
||||
storeFile = file("./src/androidMain/keystore/keystore.jks")
|
||||
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystorePropertiesFile.inputStream().let(keystoreProperties::load)
|
||||
storePassword = keystoreProperties.getProperty("storePassword")
|
||||
keyAlias = keystoreProperties.getProperty("keyAlias")
|
||||
keyPassword = keystoreProperties.getProperty("keyPassword")
|
||||
} else {
|
||||
storePassword = System.getenv("KEYSTORE_PASSWORD")
|
||||
keyAlias = System.getenv("RELEASE_SIGN_KEY_ALIAS")
|
||||
keyPassword = System.getenv("RELEASE_SIGN_KEY_PASSWORD")
|
||||
}
|
||||
}
|
||||
|
||||
create("debugSigning") {
|
||||
initWith(getByName("release"))
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
signingConfig = signingConfigs.getByName("debugSigning")
|
||||
}
|
||||
getByName("release") {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
|
||||
isMinifyEnabled = false
|
||||
}
|
||||
}
|
||||
@@ -184,7 +213,7 @@ compose.desktop {
|
||||
|
||||
nativeDistributions {
|
||||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
||||
packageName = "dev.meloda.overseerr.desktopApp"
|
||||
packageName = "dev.meloda.overseerr"
|
||||
packageVersion = "1.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -3,10 +3,10 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KotlinProject</title>
|
||||
<title>Wasm App</title>
|
||||
<link type="text/css" rel="stylesheet" href="styles.css">
|
||||
<script type="application/javascript" src="composeApp.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user