@@ -89,17 +89,19 @@ def renameResultApks (variant) {
8989}
9090
9191// gets the devDependencies declared in the package.json and excludes them from the build
92- task getDevDependencies << {
93- println " $configStage getDevDependencies"
92+ task getDevDependencies {
93+ doLast {
94+ println " $configStage getDevDependencies"
9495
95- String content = new File (" $projectDir /../../package.json" ). getText(" UTF-8" )
96- def jsonSlurper = new JsonSlurper ()
97- def packageJsonMap = jsonSlurper. parseText(content)
96+ String content = new File (" $projectDir /../../package.json" ). getText(" UTF-8" )
97+ def jsonSlurper = new JsonSlurper ()
98+ def packageJsonMap = jsonSlurper. parseText(content)
9899
99- packageJsonContents = packageJsonMap. devDependencies;
100+ packageJsonContents = packageJsonMap. devDependencies;
100101
101- packageJsonContents. each { entry ->
102- excludedDevDependencies. add(entry. key + ' /platforms/android/**/*.jar' )
102+ packageJsonContents. each { entry ->
103+ excludedDevDependencies. add(entry. key + ' /platforms/android/**/*.jar' )
104+ }
103105 }
104106}
105107// //////////////////////////////////////////////////////////////////////////////////
@@ -480,16 +482,18 @@ task copyAarDependencies (type: Copy) {
480482 into " $projectDir /libs/aar"
481483}
482484
483- task addAarDependencies << {
484- println " $configStage addAarDependencies"
485- // manually traverse all the locally copied AAR files and add them to the project compilation dependencies list
486- FileTree tree = fileTree(dir : " $projectDir /libs/aar" , include : [" **/*.aar" ])
487- tree. each { File file ->
488- // remove the extension of the file (.aar)
489- def length = file. name. length() - 4
490- def fileName = file. name[0 .. < length]
491- println " \t +adding dependency: " + file. getAbsolutePath()
492- project. dependencies. add(" compile" , [name : fileName, ext : " aar" ])
485+ task addAarDependencies {
486+ doLast {
487+ println " $configStage addAarDependencies"
488+ // manually traverse all the locally copied AAR files and add them to the project compilation dependencies list
489+ FileTree tree = fileTree(dir : " $projectDir /libs/aar" , include : [" **/*.aar" ])
490+ tree. each { File file ->
491+ // remove the extension of the file (.aar)
492+ def length = file. name. length() - 4
493+ def fileName = file. name[0 .. < length]
494+ println " \t +adding dependency: " + file. getAbsolutePath()
495+ project. dependencies. add(" compile" , [name : fileName, ext : " aar" ])
496+ }
493497 }
494498}
495499
0 commit comments