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") } } allprojects { repositories { google() mavenCentral() maven { url = uri("https://jitpack.io") } } } def weblibreGoMobileAar = file("../../../native/go_mobile_runtime/build/weblibre-go.aar") def requireWebLibreGoMobileAar = { if (!weblibreGoMobileAar.exists()) { throw new GradleException( "Missing combined gomobile runtime AAR: ${weblibreGoMobileAar}. " + "Run native/go_mobile_runtime/scripts/build-android.sh from the repository root." ) } } apply plugin: "com.android.library" apply plugin: "kotlin-android" android { namespace = "eu.weblibre.flutter_tor" compileSdk = 36 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" } defaultConfig { minSdk = 24 consumerProguardFiles("consumer-rules.pro") } dependencies { // Tor core libraries implementation("info.guardianproject:tor-android:0.4.9.6") implementation("info.guardianproject:jtorctl:0.4.5.7") // Pluggable transports are provided by the app-level combined gomobile AAR. requireWebLibreGoMobileAar() compileOnly(files(weblibreGoMobileAar)) // Coroutines for async operations implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0") // Testing testImplementation("org.jetbrains.kotlin:kotlin-test") testImplementation("org.mockito:mockito-core:5.23.0") } testOptions { unitTests.all { useJUnitPlatform() testLogging { events "passed", "skipped", "failed", "standardOut", "standardError" outputs.upToDateWhen {false} showStandardStreams = true } } } }