feat: add .env support for local release builds
apple / swift (push) Successful in 53s
ci / rust (push) Successful in 1m38s
ci / web (push) Successful in 30s
ci / docs-site (push) Successful in 37s
android / android (push) Failing after 4m20s
deb / build-publish (push) Successful in 2m35s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 6s
decky / build-publish (push) Successful in 12s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
ci / bench (push) Successful in 4m44s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m24s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m30s
docker / deploy-docs (push) Successful in 18s
apple / swift (push) Successful in 53s
ci / rust (push) Successful in 1m38s
ci / web (push) Successful in 30s
ci / docs-site (push) Successful in 37s
android / android (push) Failing after 4m20s
deb / build-publish (push) Successful in 2m35s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 6s
decky / build-publish (push) Successful in 12s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
ci / bench (push) Successful in 4m44s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m24s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m30s
docker / deploy-docs (push) Successful in 18s
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
# Punktfunk Android Release Secrets
|
||||||
|
# Copy this file to .env and fill in the values.
|
||||||
|
# DO NOT COMMIT THE .env FILE!
|
||||||
|
|
||||||
|
RELEASE_KEYSTORE_FILE=../punktfunk-release.jks
|
||||||
|
RELEASE_KEYSTORE_PASSWORD=
|
||||||
|
RELEASE_KEY_ALIAS=punktfunk-key
|
||||||
|
RELEASE_KEY_PASSWORD=
|
||||||
|
VERSION_CODE=1
|
||||||
@@ -9,3 +9,7 @@ captures/
|
|||||||
|
|
||||||
# Native libraries produced by cargo-ndk — regenerated by the :kit cargoNdk* tasks.
|
# Native libraries produced by cargo-ndk — regenerated by the :kit cargoNdk* tasks.
|
||||||
**/src/main/jniLibs/
|
**/src/main/jniLibs/
|
||||||
|
|
||||||
|
# Secrets
|
||||||
|
.env
|
||||||
|
*.jks
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
|
import java.util.Properties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
// AGP 9 built-in Kotlin: NO org.jetbrains.kotlin.android. The Compose compiler plugin is
|
// AGP 9 built-in Kotlin: NO org.jetbrains.kotlin.android. The Compose compiler plugin is
|
||||||
@@ -12,23 +14,37 @@ android {
|
|||||||
compileSdk = 37 // Android 17 — required by androidx.core 1.19.0; targetSdk stays 36 for now.
|
compileSdk = 37 // Android 17 — required by androidx.core 1.19.0; targetSdk stays 36 for now.
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
// Load from .env if it exists (local dev), otherwise from System.getenv (CI)
|
||||||
|
val envFile = project.rootProject.file(".env")
|
||||||
|
val props = Properties()
|
||||||
|
if (envFile.exists()) {
|
||||||
|
envFile.inputStream().use { props.load(it) }
|
||||||
|
}
|
||||||
|
|
||||||
applicationId = "io.unom.punktfunk"
|
applicationId = "io.unom.punktfunk"
|
||||||
minSdk = 31
|
minSdk = 31
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = System.getenv("VERSION_CODE")?.toInt() ?: 1
|
val vCode = (props.getProperty("VERSION_CODE") ?: System.getenv("VERSION_CODE"))
|
||||||
|
versionCode = vCode?.toInt() ?: 1
|
||||||
versionName = "0.0.2" // bumped for first Play Store release
|
versionName = "0.0.2" // bumped for first Play Store release
|
||||||
ndk { abiFilters += listOf("arm64-v8a", "x86_64") }
|
ndk { abiFilters += listOf("arm64-v8a", "x86_64") }
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
create("release") {
|
create("release") {
|
||||||
// These are provided by CI secrets as environment variables
|
// Load from .env if it exists (local dev), otherwise from System.getenv (CI)
|
||||||
val keystoreFile = System.getenv("RELEASE_KEYSTORE_FILE")
|
val envFile = project.rootProject.file(".env")
|
||||||
if (keystoreFile != null) {
|
val props = Properties()
|
||||||
storeFile = file(keystoreFile)
|
if (envFile.exists()) {
|
||||||
storePassword = System.getenv("RELEASE_KEYSTORE_PASSWORD")
|
envFile.inputStream().use { props.load(it) }
|
||||||
keyAlias = System.getenv("RELEASE_KEY_ALIAS")
|
}
|
||||||
keyPassword = System.getenv("RELEASE_KEY_PASSWORD")
|
|
||||||
|
val ksFile = props.getProperty("RELEASE_KEYSTORE_FILE") ?: System.getenv("RELEASE_KEYSTORE_FILE")
|
||||||
|
if (ksFile != null) {
|
||||||
|
storeFile = file(ksFile)
|
||||||
|
storePassword = props.getProperty("RELEASE_KEYSTORE_PASSWORD") ?: System.getenv("RELEASE_KEYSTORE_PASSWORD")
|
||||||
|
keyAlias = props.getProperty("RELEASE_KEY_ALIAS") ?: System.getenv("RELEASE_KEY_ALIAS")
|
||||||
|
keyPassword = props.getProperty("RELEASE_KEY_PASSWORD") ?: System.getenv("RELEASE_KEY_PASSWORD")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user