diff --git a/build.gradle.kts b/build.gradle.kts index 150fbfdcb..67133813b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("com.github.ben-manes.versions") version "0.51.0" - id("com.google.devtools.ksp") version "2.0.20-1.0.24" apply false + id("com.google.devtools.ksp") version "2.0.21-1.0.26" apply false } buildscript { @@ -21,7 +21,7 @@ buildscript { classpath("com.google.android.gms:oss-licenses-plugin:0.10.6") classpath("com.google.firebase:firebase-crashlytics-gradle:3.0.2") classpath("com.google.gms:google-services:4.4.2") - classpath("com.vanniktech:gradle-maven-publish-plugin:0.29.0") + classpath("com.vanniktech:gradle-maven-publish-plugin:0.30.0") classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20") classpath("org.mozilla.rust-android-gradle:plugin:0.9.4") } diff --git a/buildSrc/src/main/kotlin/Helpers.kt b/buildSrc/src/main/kotlin/Helpers.kt index 85d6e5e56..d5526a935 100644 --- a/buildSrc/src/main/kotlin/Helpers.kt +++ b/buildSrc/src/main/kotlin/Helpers.kt @@ -8,7 +8,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension import java.util.Locale -const val lifecycleVersion = "2.8.4" +const val lifecycleVersion = "2.8.7" private val Project.android get() = extensions.getByName("android") private val BaseExtension.lint get() = (this as CommonExtension<*, *, *, *, *, *>).lint @@ -64,9 +64,9 @@ fun Project.setupCore() { disable += "UseAppTint" } buildFeatures.buildConfig = true - ndkVersion = "27.0.12077973" + ndkVersion = "27.2.12479018" } - dependencies.add("coreLibraryDesugaring", "com.android.tools:desugar_jdk_libs:2.1.1") + dependencies.add("coreLibraryDesugaring", "com.android.tools:desugar_jdk_libs:2.1.2") } fun Project.setupApp() { diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 2db45c69e..86e3fda49 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -88,12 +88,12 @@ tasks.register("cargoClean") { tasks.clean.dependsOn("cargoClean") dependencies { - val coroutinesVersion = "1.8.1" + val coroutinesVersion = "1.9.0" val roomVersion = "2.6.1" - val workVersion = "2.9.1" + val workVersion = "2.10.0" api(project(":plugin")) - api("androidx.core:core-ktx:1.13.1") + api("androidx.core:core-ktx:1.15.0") api("com.google.android.material:material:1.12.0") api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion") @@ -103,10 +103,10 @@ dependencies { api("androidx.work:work-runtime-ktx:$workVersion") api("com.google.android.gms:play-services-oss-licenses:17.1.0") api("com.google.code.gson:gson:2.11.0") - api("com.google.firebase:firebase-analytics:22.1.0") - api("com.google.firebase:firebase-crashlytics:19.0.3") + api("com.google.firebase:firebase-analytics:22.1.2") + api("com.google.firebase:firebase-crashlytics:19.2.1") api("com.jakewharton.timber:timber:5.0.1") - api("dnsjava:dnsjava:3.6.1") + api("dnsjava:dnsjava:3.6.2") api("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion") api("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion") ksp("androidx.room:room-compiler:$roomVersion") diff --git a/core/src/main/java/com/github/shadowsocks/net/DnsResolverCompat.kt b/core/src/main/java/com/github/shadowsocks/net/DnsResolverCompat.kt index 86ccb78ba..90d8ce164 100644 --- a/core/src/main/java/com/github/shadowsocks/net/DnsResolverCompat.kt +++ b/core/src/main/java/com/github/shadowsocks/net/DnsResolverCompat.kt @@ -92,7 +92,8 @@ sealed class DnsResolverCompat { * See also: https://issuetracker.google.com/issues/133874590 */ private val unboundedIO by lazy { - if (Core.activity.isLowRamDevice) Dispatchers.IO else Dispatchers.IO.limitedParallelism(Int.MAX_VALUE) + if (Core.activity.isLowRamDevice) Dispatchers.IO + else Dispatchers.IO.limitedParallelism(Int.MAX_VALUE, "unboundedIO") } override suspend fun resolve(network: Network, host: String) = diff --git a/core/src/main/jni/Android.mk b/core/src/main/jni/Android.mk index dffc5f81f..f9855a8b5 100755 --- a/core/src/main/jni/Android.mk +++ b/core/src/main/jni/Android.mk @@ -159,6 +159,7 @@ TUN2SOCKS_SOURCES := \ base/BPending.c \ system/BDatagram_unix.c \ flowextra/PacketPassInactivityMonitor.c \ + socks_udp_client/SocksUdpClient.c \ tun2socks/SocksUdpGwClient.c \ udpgw_client/UdpGwClient.c diff --git a/core/src/main/jni/badvpn b/core/src/main/jni/badvpn index fb01eb983..2814301fb 160000 --- a/core/src/main/jni/badvpn +++ b/core/src/main/jni/badvpn @@ -1 +1 @@ -Subproject commit fb01eb983915c9a09a690ad44c6028dd87500ec7 +Subproject commit 2814301fbd7e1838634580a18a34f8b68587f931 diff --git a/core/src/main/jni/libancillary b/core/src/main/jni/libancillary index 311e5d14f..232d69a5e 160000 --- a/core/src/main/jni/libancillary +++ b/core/src/main/jni/libancillary @@ -1 +1 @@ -Subproject commit 311e5d14f593f16c785bc6605220517eb1f21f6b +Subproject commit 232d69a5ebb4461b572bd3f3b97088091e01c243 diff --git a/core/src/main/rust/shadowsocks-rust b/core/src/main/rust/shadowsocks-rust index c341c8990..a03006a75 160000 --- a/core/src/main/rust/shadowsocks-rust +++ b/core/src/main/rust/shadowsocks-rust @@ -1 +1 @@ -Subproject commit c341c899080e9eb0f636d96b30f18376ab3183d4 +Subproject commit a03006a753486e64717d6e3afa91e0c6d043c557 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9355b4155..df97d72b8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 831a48855..10d41102a 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -15,13 +15,14 @@ android { } dependencies { - val cameraxVersion = "1.3.4" + val cameraxVersion = "1.4.0" implementation("androidx.browser:browser:1.8.0") implementation("androidx.camera:camera-camera2:$cameraxVersion") implementation("androidx.camera:camera-lifecycle:$cameraxVersion") implementation("androidx.camera:camera-view:$cameraxVersion") - implementation("androidx.constraintlayout:constraintlayout:2.1.4") + implementation("androidx.concurrent:concurrent-futures-ktx:1.2.0") + implementation("androidx.constraintlayout:constraintlayout:2.2.0") implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion") implementation("com.google.mlkit:barcode-scanning:17.3.0") implementation("com.google.zxing:core:3.5.3") diff --git a/mobile/src/main/java/com/github/shadowsocks/ScannerActivity.kt b/mobile/src/main/java/com/github/shadowsocks/ScannerActivity.kt index a53d565de..faec1f58e 100644 --- a/mobile/src/main/java/com/github/shadowsocks/ScannerActivity.kt +++ b/mobile/src/main/java/com/github/shadowsocks/ScannerActivity.kt @@ -31,14 +31,19 @@ import android.view.MenuItem import android.widget.Toast import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AppCompatActivity -import androidx.camera.core.* +import androidx.camera.core.Camera +import androidx.camera.core.CameraSelector +import androidx.camera.core.ExperimentalGetImage +import androidx.camera.core.ImageAnalysis +import androidx.camera.core.ImageProxy +import androidx.camera.core.Preview import androidx.camera.core.resolutionselector.ResolutionSelector import androidx.camera.core.resolutionselector.ResolutionStrategy import androidx.camera.lifecycle.ProcessCameraProvider import androidx.camera.view.PreviewView +import androidx.concurrent.futures.await import androidx.core.content.getSystemService import androidx.lifecycle.lifecycleScope -import androidx.work.await import com.github.shadowsocks.Core.app import com.github.shadowsocks.database.Profile import com.github.shadowsocks.database.ProfileManager @@ -50,8 +55,13 @@ import com.google.mlkit.vision.barcode.BarcodeScanning import com.google.mlkit.vision.barcode.ZoomSuggestionOptions import com.google.mlkit.vision.barcode.common.Barcode import com.google.mlkit.vision.common.InputImage -import kotlinx.coroutines.* +import kotlinx.coroutines.CancellationException +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.asExecutor +import kotlinx.coroutines.launch import kotlinx.coroutines.tasks.await +import kotlinx.coroutines.withContext import timber.log.Timber class ScannerActivity : AppCompatActivity(), ImageAnalysis.Analyzer, ZoomSuggestionOptions.ZoomCallback { diff --git a/repositories.gradle.kts b/repositories.gradle.kts index aeaeb4a4b..ad6f107dc 100644 --- a/repositories.gradle.kts +++ b/repositories.gradle.kts @@ -1,6 +1,6 @@ rootProject.extra.apply { - set("androidPlugin", "com.android.tools.build:gradle:8.5.2") - set("kotlinVersion", "2.0.20") + set("androidPlugin", "com.android.tools.build:gradle:8.7.2") + set("kotlinVersion", "2.0.21") } repositories {