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:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
*.iml
|
|
||||||
.gradle
|
.gradle
|
||||||
.idea
|
.idea
|
||||||
.kotlin
|
.kotlin
|
||||||
@@ -45,3 +44,4 @@ google-services.json
|
|||||||
|
|
||||||
# Android Profiling
|
# Android Profiling
|
||||||
*.hprof
|
*.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.dsl.JvmTarget
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
|
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
|
||||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.multiplatform)
|
alias(libs.plugins.multiplatform)
|
||||||
@@ -140,7 +141,7 @@ android {
|
|||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
|
|
||||||
applicationId = "dev.meloda.overseerr.androidApp"
|
applicationId = "dev.meloda.overseerr"
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "1.0.0"
|
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 {
|
buildTypes {
|
||||||
|
getByName("debug") {
|
||||||
|
signingConfig = signingConfigs.getByName("debugSigning")
|
||||||
|
}
|
||||||
getByName("release") {
|
getByName("release") {
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
|
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,7 +213,7 @@ compose.desktop {
|
|||||||
|
|
||||||
nativeDistributions {
|
nativeDistributions {
|
||||||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
||||||
packageName = "dev.meloda.overseerr.desktopApp"
|
packageName = "dev.meloda.overseerr"
|
||||||
packageVersion = "1.0.0"
|
packageVersion = "1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<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">
|
<link type="text/css" rel="stylesheet" href="styles.css">
|
||||||
<script type="application/javascript" src="composeApp.js"></script>
|
<script type="application/javascript" src="composeApp.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user