mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
If an Android module depends on another module's default configuration, Android Studio's linter won't recognise references to classes in the other module. Instead, the Android module must depend on the other module without specifying a configuration. This entails some changes in the handling of transitive dependencies, and the other module must include its main classes in its testOutput artifact so the Android module's tests can use them.
69 lines
1.7 KiB
Groovy
69 lines
1.7 KiB
Groovy
apply plugin: 'java-library'
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
apply plugin: 'idea'
|
|
apply plugin: 'witness'
|
|
apply from: 'witness.gradle'
|
|
apply from: '../dagger.gradle'
|
|
|
|
configurations {
|
|
tor
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(path: ':bramble-core', configuration: 'default')
|
|
|
|
implementation fileTree(dir: 'libs', include: '*.jar')
|
|
def jna_version = '4.5.2'
|
|
implementation "net.java.dev.jna:jna:$jna_version"
|
|
implementation "net.java.dev.jna:jna-platform:$jna_version"
|
|
|
|
tor "org.briarproject:tor-linux:$tor_version"
|
|
tor "org.briarproject:tor-windows:$tor_version"
|
|
tor "org.briarproject:obfs4proxy-linux:$obfs4proxy_version"
|
|
tor "org.briarproject:obfs4proxy-windows:$obfs4proxy_version"
|
|
tor "org.briarproject:snowflake-linux:$snowflake_version"
|
|
tor "org.briarproject:snowflake-windows:$snowflake_version"
|
|
|
|
annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
|
|
|
|
testImplementation project(path: ':bramble-api', configuration: 'testOutput')
|
|
testImplementation project(path: ':bramble-core', configuration: 'testOutput')
|
|
|
|
testImplementation "junit:junit:$junit_version"
|
|
testImplementation "org.jmock:jmock:$jmock_version"
|
|
testImplementation "org.jmock:jmock-junit4:$jmock_version"
|
|
|
|
testAnnotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
|
|
}
|
|
|
|
def torBinariesDir = 'src/main/resources'
|
|
|
|
task cleanTorBinaries {
|
|
doLast {
|
|
delete fileTree(torBinariesDir) { include '*.zip' }
|
|
}
|
|
}
|
|
|
|
clean.dependsOn cleanTorBinaries
|
|
|
|
task unpackTorBinaries {
|
|
doLast {
|
|
copy {
|
|
from configurations.tor.collect { zipTree(it) }
|
|
into torBinariesDir
|
|
}
|
|
}
|
|
dependsOn cleanTorBinaries
|
|
}
|
|
|
|
processResources {
|
|
inputs.dir torBinariesDir
|
|
dependsOn unpackTorBinaries
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
systemProperty 'java.library.path', 'libs'
|
|
}
|