Commit d29812a4 authored by akwizgran's avatar akwizgran

Delete Tor binaries when cleaning.

parent 6565172e
......@@ -43,9 +43,26 @@ dependencies {
testImplementation "org.hamcrest:hamcrest-core:1.3"
}
project.afterEvaluate {
copy {
from configurations.tor.collect { zipTree(it) }
into 'src/main/res/raw'
def torBinariesDir = 'src/main/res/raw'
task unpackTorBinaries {
outputs.dir torBinariesDir
doLast {
copy {
from configurations.tor.collect { zipTree(it) }
into torBinariesDir
}
}
}
tasks.withType(JavaCompile) {
dependsOn unpackTorBinaries
}
task cleanTorBinaries {
doLast {
delete fileTree(torBinariesDir) { include '*.zip' }
}
}
clean.dependsOn cleanTorBinaries
......@@ -32,13 +32,30 @@ dependencies {
testApt 'com.google.dagger:dagger-compiler:2.0.2'
}
project.afterEvaluate {
copy {
from configurations.tor.collect { zipTree(it) }
into 'src/main/resources'
def torBinariesDir = 'src/main/resources'
task unpackTorBinaries {
outputs.dir torBinariesDir
doLast {
copy {
from configurations.tor.collect { zipTree(it) }
into torBinariesDir
}
}
}
tasks.withType(JavaCompile) {
dependsOn unpackTorBinaries
}
task cleanTorBinaries {
doLast {
delete fileTree(torBinariesDir) { include '*.zip' }
}
}
clean.dependsOn cleanTorBinaries
tasks.withType(Test) {
systemProperty 'java.library.path', 'libs'
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment