mirror of
https://github.com/kalarina-bit/Sparkledns.git
synced 2026-11-22 15:46:09 +00:00
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:
@@ -4,3 +4,6 @@ local.properties
|
|||||||
.idea/
|
.idea/
|
||||||
*.iml
|
*.iml
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
# Signing keys must never be committed
|
||||||
|
*.jks
|
||||||
|
*.keystore
|
||||||
|
|||||||
+13
-12
@@ -1,11 +1,12 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
alias(libs.plugins.android.application)
|
||||||
id("org.jetbrains.kotlin.plugin.compose")
|
alias(libs.plugins.kotlin.compose)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "cc.skysparkle.sparkledns"
|
namespace = "cc.skysparkle.sparkledns"
|
||||||
compileSdk = 36
|
// The current AndroidX libraries require it
|
||||||
|
compileSdk = 37
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "cc.skysparkle.sparkledns"
|
applicationId = "cc.skysparkle.sparkledns"
|
||||||
@@ -71,17 +72,17 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(platform("androidx.compose:compose-bom:2025.09.00"))
|
implementation(platform(libs.androidx.compose.bom))
|
||||||
implementation("androidx.activity:activity-compose:1.10.1")
|
implementation(libs.androidx.activity.compose)
|
||||||
implementation("androidx.compose.ui:ui")
|
implementation(libs.androidx.compose.ui)
|
||||||
implementation("androidx.compose.material3:material3")
|
implementation(libs.androidx.compose.material3)
|
||||||
// Already pulled in by Compose at this version; declared because the app uses it directly
|
// 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(libs.androidx.lifecycle.runtime.compose)
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
|
implementation(libs.kotlinx.coroutines.android)
|
||||||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
implementation(libs.okhttp)
|
||||||
|
|
||||||
// Debug builds only, never part of a release
|
// 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)
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<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 -->
|
<!-- Keeps the scheduled blocklist update after a reboot -->
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
|
|
||||||
@@ -21,6 +21,8 @@
|
|||||||
<application
|
<application
|
||||||
android:name=".SparkleApp"
|
android:name=".SparkleApp"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
android:localeConfig="@xml/locales_config"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
@@ -40,7 +42,7 @@
|
|||||||
<service
|
<service
|
||||||
android:name=".DohVpnService"
|
android:name=".DohVpnService"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:foregroundServiceType="specialUse"
|
android:foregroundServiceType="systemExempted"
|
||||||
android:permission="android.permission.BIND_VPN_SERVICE">
|
android:permission="android.permission.BIND_VPN_SERVICE">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.net.VpnService" />
|
<action android:name="android.net.VpnService" />
|
||||||
@@ -48,9 +50,6 @@
|
|||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.net.VpnService.SUPPORTS_ALWAYS_ON"
|
android:name="android.net.VpnService.SUPPORTS_ALWAYS_ON"
|
||||||
android:value="true" />
|
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>
|
||||||
|
|
||||||
<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>
|
||||||
@@ -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
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
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
|
// 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
|
alias(libs.plugins.kotlin.android) apply false
|
||||||
id("org.jetbrains.kotlin.plugin.compose") version "2.4.0" apply false
|
alias(libs.plugins.kotlin.compose) apply false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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" }
|
||||||
Reference in New Issue
Block a user