From 6d8c0770c31a335a020e96b1fc5dff1bef90eb74 Mon Sep 17 00:00:00 2001 From: "Markus M. May" Date: Thu, 1 Feb 2018 21:11:28 +0100 Subject: [PATCH] Rework copying of libs --- app/build.gradle | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3d34fd6c61..84100e9397 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -232,19 +232,22 @@ dependencies { task unzip(type: Copy) { def zipPath = configurations.compile.find {it.name.startsWith("danars") } - println zipPath def zipFile = file(zipPath) def outputDir = file("${buildDir}/unpacked/dist") from zipTree(zipFile) into outputDir +} - def src = new File(outputDir, "danars-support-lib-master") - def target = file("src/main/jniLibs") - target.mkdirs() +task copyLibs(dependsOn: unzip, type: Copy) { + def outputDir = file("${buildDir}/unpacked/dist") + def src = file(new File(outputDir, "danars-support-lib-master")) + println src + def target = file("src/main/jniLibs/") from src into target + rename("danars-support-lib-master", "jniLibs") } task full_clean(type: Delete) { @@ -252,4 +255,4 @@ task full_clean(type: Delete) { } clean.dependsOn full_clean -preBuild.dependsOn unzip \ No newline at end of file +preBuild.dependsOn copyLibs \ No newline at end of file