- New RulesScreen with two tabs: Custom Rules (structured CRUD with type/pattern/outbound, enable/disable, filter chips) and Rule Sets (28 built-in + remote URL support, per-service toggle) - Rule sets now loaded natively by engine via rule_set declarations instead of Kotlin-side inline expansion — simpler and more efficient - Remote rule sets downloaded through proxy (download_detour: "proxy") - ProxyProtocol enum as single source of truth for supported protocols, fixes NodeTester excluding hysteria2/tuic/wireguard/socks5 - Quick Rule auto-detects type (IP_CIDR, DOMAIN_SUFFIX, DOMAIN_KEYWORD) - Logs screen: add open/share button via FileProvider - Build time shown in settings
78 lines
2.3 KiB
Kotlin
78 lines
2.3 KiB
Kotlin
import java.text.SimpleDateFormat
|
|
import java.util.Date
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.sing.vpn"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.sing.vpn"
|
|
minSdk = 24
|
|
targetSdk = 34
|
|
versionCode = 5
|
|
versionName = "0.5"
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
val buildTime = SimpleDateFormat("yyyy-MM-dd HH:mm").format(Date())
|
|
buildConfigField("String", "BUILD_TIME", "\"$buildTime\"")
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.5.10"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.core:core-ktx:1.12.0")
|
|
implementation("androidx.core:core-splashscreen:1.0.1")
|
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
|
|
|
// Compose BOM
|
|
val composeBom = platform("androidx.compose:compose-bom:2024.02.00")
|
|
implementation(composeBom)
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
implementation("androidx.compose.material3:material3")
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
implementation("androidx.activity:activity-compose:1.8.2")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.7.0")
|
|
implementation("androidx.navigation:navigation-compose:2.7.7")
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
|
|
androidTestImplementation("androidx.test:runner:1.5.2")
|
|
androidTestImplementation("androidx.test:rules:1.5.0")
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
|
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0")
|
|
androidTestImplementation(composeBom)
|
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
|
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
|
}
|