Add a way to dependent android and iOS library from node modules
This commit is contained in:
@@ -47,4 +47,19 @@ afterEvaluate {
|
||||
task buildJSBundle(type: Exec) {
|
||||
workingDir project.rootDir.getParent()
|
||||
commandLine 'npm', 'run', 'build'
|
||||
}
|
||||
|
||||
def nodeModuleDir = new File(rootDir.getParent() + File.separator + "node_modules")
|
||||
if (nodeModuleDir.isDirectory()) {
|
||||
nodeModuleDir.listFiles().each {
|
||||
if (new File(it.getAbsolutePath() + File.separator + "__doric_library__").exists()) {
|
||||
println("Find doric plugin library ${it.name} in ${it}")
|
||||
def name = it.name
|
||||
android {
|
||||
dependencies {
|
||||
implementation project(":${name}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user