Files
MrbWebLibre/packages/flutter_tor/android/build.gradle
T

91 lines
2.3 KiB
Groovy

group = "eu.weblibre.flutter_tor"
version = "1.0-SNAPSHOT"
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:9.2.1")
}
}
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"
android {
namespace = "eu.weblibre.flutter_tor"
compileSdk = 37
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = 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.11")
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
}
}
}
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}