import com.android.build.gradle.tasks.MergeResources apply plugin: 'com.android.library' apply plugin: 'witness' apply from: 'witness.gradle' android { compileSdkVersion 29 buildToolsVersion '29.0.2' defaultConfig { minSdkVersion 16 targetSdkVersion 28 versionCode 10209 versionName "1.2.9" consumerProguardFiles 'proguard-rules.txt' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } 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 { implementation project(path: ':bramble-core', configuration: 'default') tor 'org.briarproject:tor-android:0.3.5.10@zip' tor 'org.briarproject:obfs4proxy-android:0.0.11-2@zip' annotationProcessor 'com.google.dagger:dagger-compiler:2.24' compileOnly 'javax.annotation:jsr250-api:1.0' testImplementation project(path: ':bramble-api', configuration: 'testOutput') testImplementation 'junit:junit:4.12' testImplementation "org.jmock:jmock:2.8.2" testImplementation "org.jmock:jmock-junit4:2.8.2" testImplementation "org.jmock:jmock-legacy:2.8.2" } def torBinariesDir = 'src/main/res/raw' task cleanTorBinaries { doLast { delete fileTree(torBinariesDir) { include '*.zip' } } } clean.dependsOn cleanTorBinaries task unpackTorBinaries { doLast { copy { from configurations.tor.collect { zipTree(it) } into torBinariesDir // TODO: Remove after next Tor upgrade, which won't include non-PIE binaries include 'geoip.zip', '*_pie.zip' } } dependsOn cleanTorBinaries } tasks.withType(MergeResources) { inputs.dir torBinariesDir dependsOn unpackTorBinaries }