From 0e676ef002d4556cddeabb3304bcb9e52277868e Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 26 Dec 2017 12:45:31 -0800 Subject: [PATCH] Fix problem with jar files in nativescript plugins This fixes a number of currently broken nativescript plugins on android. Basically any nativescript plugin that shipped with it's own jar file for native code is broken until this is made live. In the interim i execute this command before building/running android (but after it is prepared and there is a `platforms/android` directory): ``` sed -Ei '' 's/"\$\{dep.directory\}\/platforms\/android"/"\$rootDir\/\${dep.directory}\/platforms\/android"/' platforms/android/app/build.gradle ``` --- test-app/app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-app/app/build.gradle b/test-app/app/build.gradle index 3edb21dde..fc9ef3e1e 100644 --- a/test-app/app/build.gradle +++ b/test-app/app/build.gradle @@ -217,7 +217,7 @@ task addDependenciesFromNativeScriptPlugins { project.dependencies.add("compile", [name: fileName, ext: "aar"]) } - def jarFiles = fileTree(dir: file("${dep.directory}/$PLATFORMS_ANDROID"), include: ["**/*.jar"]) + def jarFiles = fileTree(dir: file("$rootDir/${dep.directory}/$PLATFORMS_ANDROID"), include: ["**/*.jar"]) jarFiles.each { jarFile -> println "\t + adding jar plugin dependency: " + jarFile.getAbsolutePath() } @@ -475,4 +475,4 @@ task cleanMdg(type: Delete) { } cleanSbg.dependsOn(cleanMdg) -clean.dependsOn(cleanSbg) \ No newline at end of file +clean.dependsOn(cleanSbg)