@@ -43,6 +43,9 @@ def MDG_OUTPUT_DIR = "mdg-output-dir.txt"
43
43
def MDG_JAVA_DEPENDENCIES = " mdg-java-dependencies.txt"
44
44
def METADATA_OUT_PATH = " $projectDir /src/main/assets/metadata"
45
45
46
+ // paths to jar libraries
47
+ def jarLibraries = new LinkedList<String > ()
48
+
46
49
// the build script will not work with previous versions of the CLI (3.1 or earlier)
47
50
def dependenciesJson = file(" $rootDir /dependencies.json" )
48
51
if (! dependenciesJson. exists()) {
@@ -228,12 +231,14 @@ task addDependenciesFromNativeScriptPlugins {
228
231
project. dependencies. add(" compile" , [name : fileName, ext : " aar" ])
229
232
}
230
233
231
- def jarFiles = fileTree(dir : file(" ${ dep.directory} /$PLATFORMS_ANDROID " ), include : [" **/*.jar" ])
234
+ def jarFiles = fileTree(dir : file(" $r ootDir / $ { dep.directory} /$PLATFORMS_ANDROID " ), include : [" **/*.jar" ])
232
235
jarFiles. each { jarFile ->
233
- println " \t + adding jar plugin dependency: " + jarFile. getAbsolutePath()
236
+ def jarFileAbsolutePath = jarFile. getAbsolutePath()
237
+ println " \t + adding jar plugin dependency: $jarFileAbsolutePath "
238
+ jarLibraries. add(jarFile. getAbsolutePath())
234
239
}
235
240
236
- project. dependencies. add(" compile " , jarFiles)
241
+ project. dependencies. add(" implementation " , jarFiles)
237
242
}
238
243
}
239
244
@@ -251,7 +256,9 @@ task addDependenciesFromAppResourcesLibraries {
251
256
252
257
def jarFiles = fileTree(dir : appResourcesLibraries, include : [" **/*.jar" ])
253
258
jarFiles. each { jarFile ->
254
- println " \t + adding jar library dependency: " + jarFile. getAbsolutePath()
259
+ def jarFileAbsolutePath = jarFile. getAbsolutePath()
260
+ println " \t + adding jar plugin dependency: $jarFileAbsolutePath "
261
+ jarLibraries. add(jarFile. getAbsolutePath())
255
262
}
256
263
257
264
project. dependencies. add(" compile" , jarFiles)
@@ -353,6 +360,7 @@ task collectAllJars {
353
360
doFirst {
354
361
def allJarPaths = new LinkedList<String > ()
355
362
allJarPaths. add(androidJar)
363
+ allJarPaths. addAll(jarLibraries)
356
364
def ft = fileTree(dir : extractedDependenciesDir, include : " **/*.jar" )
357
365
ft. each { currentJarFile ->
358
366
allJarPaths. add(currentJarFile. getAbsolutePath())
0 commit comments