Skip to content

Commit ccfc072

Browse files
committed
feat: add generated .aar files from plugins
1 parent 1f983fe commit ccfc072

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test-app/app/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ repositories {
301301
"$rootDir/${it.directory}/$PLATFORMS_ANDROID"
302302
}
303303

304+
pluginDependencies.addAll( nativescriptDependencies.collect {
305+
"$rootDir/${it.generatedDirectory}"
306+
} )
307+
304308
// some plugins may have their android dependencies in a /libs subdirectory
305309
pluginDependencies.addAll(nativescriptDependencies.collect {
306310
"$rootDir/${it.directory}/$PLATFORMS_ANDROID/libs"
@@ -428,6 +432,14 @@ task 'addDependenciesFromNativeScriptPlugins' {
428432
project.dependencies.add("implementation", [name: fileName, ext: "aar"])
429433
}
430434

435+
def generatedAarFiles = fileTree(dir: file("$rootDir/${dep.generatedDirectory}"), include: ["**/*.aar"])
436+
generatedAarFiles.each { aarFile ->
437+
def length = aarFile.name.length() - 4
438+
def fileName = aarFile.name[0..<length]
439+
outLogger.withStyle(Style.SuccessHeader).println "\t + adding generated aar plugin dependency: " + aarFile.getAbsolutePath()
440+
project.dependencies.add("implementation", [name: fileName, ext: "aar"])
441+
}
442+
431443
def jarFiles = fileTree(dir: file("$rootDir/${dep.directory}/$PLATFORMS_ANDROID"), include: ["**/*.jar"])
432444
jarFiles.each { jarFile ->
433445
def jarFileAbsolutePath = jarFile.getAbsolutePath()

0 commit comments

Comments
 (0)