Skip to content

Commit aad3276

Browse files
committed
fix: allow plugin to work with @akylas/nativescript fork
1 parent 1af7dc2 commit aad3276

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
import groovy.json.JsonSlurper
12
dependencies {
23
implementation(name:'widgets-release', ext:'aar')
34
implementation "androidx.annotation:annotation:1.1.0"
45
}
56
repositories {
6-
mavenCentral()
7+
def widgetsDir = '../../../node_modules/@nativescript/core/platforms/android'
8+
def appPackageJsonFile = file("../../../package.json")
9+
if (appPackageJsonFile.exists()) {
10+
def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
11+
if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
12+
widgetsDir = '../../../node_modules/@akylas/nativescript/platforms/android'
13+
}
14+
}
15+
println "\t + widgetsDir: $widgetsDir"
716
flatDir {
8-
dirs '../../../node_modules/@nativescript/core/platforms/android'
17+
dirs "$widgetsDir"
918
}
1019
}

0 commit comments

Comments
 (0)