Skip to content

Commit 6b8cea2

Browse files
briandilleyPlamen5kov
authored andcommitted
Fix problem with jar files in nativescript plugins (#905)
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 ```
1 parent a670b34 commit 6b8cea2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test-app/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ task addDependenciesFromNativeScriptPlugins {
217217
project.dependencies.add("compile", [name: fileName, ext: "aar"])
218218
}
219219

220-
def jarFiles = fileTree(dir: file("${dep.directory}/$PLATFORMS_ANDROID"), include: ["**/*.jar"])
220+
def jarFiles = fileTree(dir: file("$rootDir/${dep.directory}/$PLATFORMS_ANDROID"), include: ["**/*.jar"])
221221
jarFiles.each { jarFile ->
222222
println "\t + adding jar plugin dependency: " + jarFile.getAbsolutePath()
223223
}
@@ -475,4 +475,4 @@ task cleanMdg(type: Delete) {
475475
}
476476

477477
cleanSbg.dependsOn(cleanMdg)
478-
clean.dependsOn(cleanSbg)
478+
clean.dependsOn(cleanSbg)

0 commit comments

Comments
 (0)