upgrade gecko. gradle, deps

This commit is contained in:
Fabian Freund
2026-07-09 15:30:34 +02:00
parent 7a2998857f
commit 277585fc05
41 changed files with 166 additions and 157 deletions
+9 -10
View File
@@ -2,15 +2,13 @@ group = "eu.weblibre.flutter_tor"
version = "1.0-SNAPSHOT"
buildscript {
ext.kotlin_version = "2.3.21"
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.13.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
classpath("com.android.tools.build:gradle:9.2.1")
}
}
@@ -33,22 +31,17 @@ def requireWebLibreGoMobileAar = {
}
apply plugin: "com.android.library"
apply plugin: "kotlin-android"
android {
namespace = "eu.weblibre.flutter_tor"
compileSdk = 36
compileSdk = 37
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
sourceSets {
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
@@ -61,7 +54,7 @@ android {
dependencies {
// Tor core libraries
implementation("info.guardianproject:tor-android:0.4.9.6")
implementation("info.guardianproject:tor-android:0.4.9.11")
implementation("info.guardianproject:jtorctl:0.4.5.7")
// Pluggable transports are provided by the app-level combined gomobile AAR.
@@ -89,3 +82,9 @@ android {
}
}
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
@@ -217,9 +217,11 @@ class TorManager(
scope.launch {
var conn: TorControlConnection? = null
var attempts = 0
while ((conn == null || TorService.socksPort == -1) && attempts < 60) {
var upstreamSocksPort = -1
while ((conn == null || upstreamSocksPort == -1) && attempts < 60) {
delay(500)
conn = torService?.torControlConnection
upstreamSocksPort = torService?.socksPort ?: -1
attempts++
// Bail early if upstream gave up (typically due to a torrc
// parse error caught by `tor --verify-config`).
@@ -229,7 +231,7 @@ class TorManager(
}
}
if (conn != null && TorService.socksPort != -1) {
if (conn != null && upstreamSocksPort != -1) {
controlConnection = conn
try {
setupControlConnection(conn)
@@ -244,7 +246,7 @@ class TorManager(
} else {
val error = Exception(
"Failed to get fully-initialized control connection " +
"(conn=${conn != null}, torServiceSocksPort=${TorService.socksPort}, " +
"(conn=${conn != null}, torServiceSocksPort=$upstreamSocksPort, " +
"upstreamStatus=$lastUpstreamStatus). " +
"If upstreamStatus is STOPPING/OFF, tor likely rejected the torrc — check logcat for TorService."
)
@@ -1,13 +1,12 @@
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "eu.weblibre.flutter_tor_example"
compileSdk = flutter.compileSdkVersion
compileSdk = 37
ndkVersion = flutter.ndkVersion
compileOptions {
@@ -15,10 +14,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "eu.weblibre.flutter_tor_example"
@@ -39,6 +34,12 @@ android {
}
}
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}
flutter {
source = "../.."
}
@@ -1,2 +1,4 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.builtInKotlin=false
android.newDsl=false
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
@@ -19,8 +19,8 @@ pluginManagement {
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.13.2" apply false
id("org.jetbrains.kotlin.android") version "2.3.21" apply false
id("com.android.application") version "9.2.1" apply false
id("org.jetbrains.kotlin.android") version "2.4.0" apply false
}
include(":app")