Compare commits
4 Commits
7bfffd6b82
...
469baa99bb
| Author | SHA1 | Date | |
|---|---|---|---|
| 469baa99bb | |||
| 338bca798c | |||
| e9d8c9d88e | |||
| 5bfc769121 |
@@ -9,6 +9,9 @@ build/
|
||||
|
||||
# Local machine config
|
||||
local.properties
|
||||
keystore.properties
|
||||
*.jks
|
||||
*.keystore
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
|
||||
+61
-2
@@ -1,9 +1,51 @@
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("com.google.devtools.ksp")
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
|
||||
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
val keystoreProperties = Properties().apply {
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystorePropertiesFile.inputStream().use(::load)
|
||||
}
|
||||
}
|
||||
|
||||
fun signingValue(propertyName: String, envName: String): String? {
|
||||
return (keystoreProperties[propertyName] as? String)
|
||||
?.takeIf { it.isNotBlank() }
|
||||
?: System.getenv(envName)?.takeIf { it.isNotBlank() }
|
||||
}
|
||||
|
||||
val releaseStoreFile = signingValue("storeFile", "RELEASE_STORE_FILE")
|
||||
val releaseStorePassword = signingValue("storePassword", "RELEASE_STORE_PASSWORD")
|
||||
val releaseKeyAlias = signingValue("keyAlias", "RELEASE_KEY_ALIAS")
|
||||
val releaseKeyPassword = signingValue("keyPassword", "RELEASE_KEY_PASSWORD")
|
||||
val hasReleaseSigning = listOf(
|
||||
releaseStoreFile,
|
||||
releaseStorePassword,
|
||||
releaseKeyAlias,
|
||||
releaseKeyPassword
|
||||
).all { !it.isNullOrBlank() }
|
||||
|
||||
gradle.taskGraph.whenReady {
|
||||
val releaseBundleRequested = allTasks.any {
|
||||
it.path == ":app:bundleRelease" || it.name == "bundleRelease"
|
||||
}
|
||||
val releaseApkRequested = allTasks.any {
|
||||
it.path == ":app:assembleRelease" || it.name == "assembleRelease"
|
||||
}
|
||||
if ((releaseBundleRequested || releaseApkRequested) && !hasReleaseSigning) {
|
||||
throw GradleException(
|
||||
"Release signing is not configured. Fill storePassword, keyAlias, and keyPassword " +
|
||||
"in keystore.properties, or set RELEASE_STORE_FILE, RELEASE_STORE_PASSWORD, " +
|
||||
"RELEASE_KEY_ALIAS, and RELEASE_KEY_PASSWORD."
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "de.softwareapp_hb.privateqrscanner"
|
||||
compileSdk = 36
|
||||
@@ -12,7 +54,7 @@ android {
|
||||
applicationId = "de.softwareapp_hb.privateqrscanner"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 1
|
||||
versionCode = 2
|
||||
versionName = "1.0.0"
|
||||
buildConfigField("boolean", "FEATURE_PAYWALL_ENABLED", "false")
|
||||
|
||||
@@ -22,9 +64,26 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
if (hasReleaseSigning) {
|
||||
create("release") {
|
||||
storeFile = file(releaseStoreFile!!)
|
||||
storePassword = releaseStorePassword
|
||||
keyAlias = releaseKeyAlias
|
||||
keyPassword = releaseKeyPassword
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
if (hasReleaseSigning) {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
ndk {
|
||||
debugSymbolLevel = "SYMBOL_TABLE"
|
||||
}
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
@@ -89,7 +148,7 @@ dependencies {
|
||||
implementation("com.google.mlkit:barcode-scanning:17.3.0")
|
||||
implementation("com.google.android.play:review:2.0.2")
|
||||
implementation("com.google.android.play:review-ktx:2.0.2")
|
||||
implementation("com.github.bitfireAT:vcard4android:main-SNAPSHOT")
|
||||
implementation("com.github.bitfireAT:vcard4android:7dbab269865e99eb4f46a25313d6397b51cd6ba8")
|
||||
|
||||
implementation("androidx.room:room-runtime:2.8.4")
|
||||
implementation("androidx.room:room-ktx:2.8.4")
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<en-US>
|
||||
Initial release of Private QR Scanner.
|
||||
|
||||
Scan QR codes and barcodes with local processing, optional on-device history, scan-from-image support, URL safety warnings, and practical actions for links, contacts, Wi-Fi codes, email, SMS, phone numbers, and calendar events.
|
||||
</en-US>
|
||||
|
||||
<de-DE>
|
||||
Erste Version von Private QR Scanner.
|
||||
|
||||
Scanne QR-Codes und Barcodes mit lokaler Verarbeitung, optionalem Verlauf auf dem Gerät, Bild-Scan, URL-Sicherheitswarnungen und praktischen Aktionen für Links, Kontakte, WLAN-Codes, E-Mail, SMS, Telefonnummern und Kalenderereignisse.
|
||||
</de-DE>
|
||||
Binary file not shown.
Reference in New Issue
Block a user