ser
This commit is contained in:
1 parent
208da38586
commit
41a2648c6e
17 files changed
+1171
-216
No files matched your search
@@ -47,6 +47,12 @@ android {
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,4 +69,5 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
|
||||
implementation("androidx.core:core-ktx:1.13.1")
|
||||
}
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
# PaladinVPN ProGuard / R8 Rules
|
||||
# ==============================================================================
|
||||
# These rules prevent R8 from stripping classes and methods that are accessed
|
||||
# via JNI (Java Native Interface) or reflection, which would cause
|
||||
# UnsatisfiedLinkError / ClassNotFoundException at runtime.
|
||||
|
||||
# ── AmneziaWG Native Backend (JNI) ────────────────────────────────────────────
|
||||
# The wireguard_flutter plugin uses org.amnezia.awg for all tunnel operations.
|
||||
# These classes are loaded via JNI — stripping them will crash the VPN.
|
||||
-keep class org.amnezia.awg.backend.** { *; }
|
||||
-keep class org.amnezia.awg.crypto.** { *; }
|
||||
-keep class org.amnezia.awg.config.** { *; }
|
||||
-keep class com.wireguard.** { *; }
|
||||
|
||||
# ── Kotlin Coroutines (used by wireguard_flutter plugin) ──────────────────────
|
||||
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
|
||||
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
|
||||
|
||||
# ── Flutter / Platform Channels ───────────────────────────────────────────────
|
||||
-keep class io.flutter.** { *; }
|
||||
-keep class io.flutter.embedding.** { *; }
|
||||
-keep class io.flutter.plugin.** { *; }
|
||||
|
||||
# ── Google Mobile Ads (AdMob) ─────────────────────────────────────────────────
|
||||
-keep class com.google.android.gms.ads.** { *; }
|
||||
-dontwarn com.google.android.gms.ads.**
|
||||
|
||||
# ── Klaxon JSON parser (used by wireguard_flutter plugin) ─────────────────────
|
||||
-keep class com.beust.klaxon.** { *; }
|
||||
|
||||
# ── General Android / Kotlin ──────────────────────────────────────────────────
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
-keep class kotlin.Metadata { *; }
|
||||
|
||||
# Strip debug logging in release builds
|
||||
-assumenosideeffects class android.util.Log {
|
||||
public static boolean isLoggable(java.lang.String, int);
|
||||
public static int v(...);
|
||||
public static int d(...);
|
||||
public static int i(...);
|
||||
}
|
||||
@@ -4,7 +4,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"/>
|
||||
<!-- VpnService provides its own system notification; SPECIAL_USE is not needed -->
|
||||
<!-- Required by url_launcher on Android 11+ to open external browser -->
|
||||
<queries>
|
||||
<intent>
|
||||
|
||||
+19
-41
@@ -1,50 +1,28 @@
|
||||
// Root build.gradle.kts — project-level configuration only.
|
||||
// Application-specific configuration belongs in android/app/build.gradle.kts.
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
// The Flutter Gradle Plugin is applied at the app-module level, not here.
|
||||
id("dev.flutter.flutter-gradle-plugin") apply false
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.esefcloud.vpn"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.esefcloud.vpn"
|
||||
minSdk = 21
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources {
|
||||
excludes += setOf(
|
||||
"META-INF/versions/9/OSGI-INF/MANIFEST.MF"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
||||
}
|
||||
rootProject.buildDir = "../build"
|
||||
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete::class) {
|
||||
delete(rootProject.buildDir)
|
||||
}
|
||||
Reference in new issue
Block a user