Update dependencies, add a version catalog, backup rules and locale config

- Compose BOM 2026.09.00, Activity 1.13.0, Lifecycle 2.11.0, coroutines
  1.11.0, OkHttp 5.4.0, Kotlin 2.4.20; compileSdk 37 for the new AndroidX.
- Versions move to gradle/libs.versions.toml.
- The VPN service runs as a systemExempted foreground service, the type
  Android provides for active VPN apps, instead of specialUse.
- dataExtractionRules keep everything out of backups and device transfer;
  localeConfig lets the language be picked in Android settings.
- .gitignore keeps signing keys (*.jks, *.keystore) out of the repository.
This commit is contained in:
2026-11-12 17:24:21 +02:00
parent 64728e5fcd
commit 83789c8510
7 changed files with 73 additions and 20 deletions
+3
View File
@@ -4,3 +4,6 @@ local.properties
.idea/
*.iml
.DS_Store
# Signing keys must never be committed
*.jks
*.keystore
+13 -12
View File
@@ -1,11 +1,12 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.plugin.compose")
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.compose)
}
android {
namespace = "cc.skysparkle.sparkledns"
compileSdk = 36
// The current AndroidX libraries require it
compileSdk = 37
defaultConfig {
applicationId = "cc.skysparkle.sparkledns"
@@ -71,17 +72,17 @@ android {
}
dependencies {
implementation(platform("androidx.compose:compose-bom:2025.09.00"))
implementation("androidx.activity:activity-compose:1.10.1")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.material3:material3")
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.material3)
// Already pulled in by Compose at this version; declared because the app uses it directly
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.9.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.okhttp)
// Debug builds only, never part of a release
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.14")
debugImplementation(libs.leakcanary.android)
testImplementation("junit:junit:4.13.2")
testImplementation(libs.junit)
}
+4 -5
View File
@@ -6,7 +6,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" />
<!-- Keeps the scheduled blocklist update after a reboot -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
@@ -21,6 +21,8 @@
<application
android:name=".SparkleApp"
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:localeConfig="@xml/locales_config"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
@@ -40,7 +42,7 @@
<service
android:name=".DohVpnService"
android:exported="false"
android:foregroundServiceType="specialUse"
android:foregroundServiceType="systemExempted"
android:permission="android.permission.BIND_VPN_SERVICE">
<intent-filter>
<action android:name="android.net.VpnService" />
@@ -48,9 +50,6 @@
<meta-data
android:name="android.net.VpnService.SUPPORTS_ALWAYS_ON"
android:value="true" />
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="Local DNS-over-HTTPS VPN that keeps encrypted DNS active while the user has it enabled" />
</service>
<service
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<exclude domain="root" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="file" />
</cloud-backup>
<device-transfer>
<exclude domain="root" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="file" />
</device-transfer>
</data-extraction-rules>
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<locale android:name="en" />
<locale android:name="de" />
<locale android:name="ja" />
<locale android:name="lt" />
<locale android:name="ru" />
<locale android:name="zh" />
</locale-config>
+3 -3
View File
@@ -1,6 +1,6 @@
plugins {
id("com.android.application") version "9.2.1" apply false
alias(libs.plugins.android.application) apply false
// Not applied to modules: only pins the Kotlin version used by AGP's built-in Kotlin
id("org.jetbrains.kotlin.android") version "2.4.0" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.4.0" apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
}
+26
View File
@@ -0,0 +1,26 @@
[versions]
agp = "9.2.1"
kotlin = "2.4.20"
composeBom = "2026.09.00"
activityCompose = "1.13.0"
lifecycleRuntimeCompose = "2.11.0"
kotlinxCoroutines = "1.11.0"
okhttp = "5.4.0"
leakcanary = "2.14"
junit = "4.13.2"
[libraries]
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycleRuntimeCompose" }
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" }
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
leakcanary-android = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakcanary" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }