1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- apply plugin: 'com.android.library'
- apply plugin: 'witness'
- apply from: 'witness.gradle'
- android {
- compileSdkVersion 33
- buildToolsVersion '33.0.0'
- packagingOptions {
- doNotStrip '**/*.so'
- }
- defaultConfig {
- minSdkVersion 16
- targetSdkVersion 31
- versionCode 10423
- versionName "1.4.23"
- consumerProguardFiles 'proguard-rules.txt'
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- testInstrumentationRunnerArguments disableAnalytics: 'true'
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- lintOptions {
- // FIXME
- warning "LintError"
- warning "InvalidPackage"
- warning "MissingPermission"
- warning "InlinedApi", "ObsoleteSdkInt", "Override", "NewApi", "UnusedAttribute"
- }
- }
- configurations {
- tor
- }
- dependencies {
- // In theory this dependency shouldn't be needed, but without it Android Studio's linter will
- // complain about unresolved symbols for bramble-api test classes in bramble-android tests,
- // even though the bramble-api test classes are provided by the testImplementation dependency
- // below and the compiler can find them
- implementation project(':bramble-api')
- implementation project(':bramble-core')
- implementation 'androidx.annotation:annotation:1.5.0'
- tor "org.briarproject:tor-android:$tor_version"
- tor "org.briarproject:obfs4proxy-android:$obfs4proxy_version"
- tor "org.briarproject:snowflake-android:$snowflake_version"
- annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
- compileOnly 'javax.annotation:jsr250-api:1.0'
- testImplementation project(path: ':bramble-api', configuration: 'testOutput')
- testImplementation "junit:junit:$junit_version"
- testImplementation "org.jmock:jmock:$jmock_version"
- testImplementation "org.jmock:jmock-junit4:$jmock_version"
- testImplementation "org.jmock:jmock-imposters:$jmock_version"
- }
- def torLibsDir = 'src/main/jniLibs'
- task cleanTorBinaries {
- outputs.dir torLibsDir
- doLast {
- delete fileTree(torLibsDir)
- }
- }
- clean.dependsOn cleanTorBinaries
- task unpackTorBinaries {
- outputs.dir torLibsDir
- doLast {
- copy {
- from configurations.tor.collect { zipTree(it) }
- into torLibsDir
- }
- }
- dependsOn cleanTorBinaries
- }
- preBuild.dependsOn unpackTorBinaries
|