Rework copying of libs
This commit is contained in:
parent
629b626306
commit
6d8c0770c3
1 changed files with 8 additions and 5 deletions
|
@ -232,19 +232,22 @@ dependencies {
|
||||||
|
|
||||||
task unzip(type: Copy) {
|
task unzip(type: Copy) {
|
||||||
def zipPath = configurations.compile.find {it.name.startsWith("danars") }
|
def zipPath = configurations.compile.find {it.name.startsWith("danars") }
|
||||||
println zipPath
|
|
||||||
def zipFile = file(zipPath)
|
def zipFile = file(zipPath)
|
||||||
def outputDir = file("${buildDir}/unpacked/dist")
|
def outputDir = file("${buildDir}/unpacked/dist")
|
||||||
|
|
||||||
from zipTree(zipFile)
|
from zipTree(zipFile)
|
||||||
into outputDir
|
into outputDir
|
||||||
|
}
|
||||||
|
|
||||||
def src = new File(outputDir, "danars-support-lib-master")
|
task copyLibs(dependsOn: unzip, type: Copy) {
|
||||||
def target = file("src/main/jniLibs")
|
def outputDir = file("${buildDir}/unpacked/dist")
|
||||||
target.mkdirs()
|
def src = file(new File(outputDir, "danars-support-lib-master"))
|
||||||
|
println src
|
||||||
|
def target = file("src/main/jniLibs/")
|
||||||
|
|
||||||
from src
|
from src
|
||||||
into target
|
into target
|
||||||
|
rename("danars-support-lib-master", "jniLibs")
|
||||||
}
|
}
|
||||||
|
|
||||||
task full_clean(type: Delete) {
|
task full_clean(type: Delete) {
|
||||||
|
@ -252,4 +255,4 @@ task full_clean(type: Delete) {
|
||||||
}
|
}
|
||||||
|
|
||||||
clean.dependsOn full_clean
|
clean.dependsOn full_clean
|
||||||
preBuild.dependsOn unzip
|
preBuild.dependsOn copyLibs
|
Loading…
Reference in a new issue