Skip to content

Commit accd389

Browse files
committed
fix(android): gradle improvements
1 parent 45f36e2 commit accd389

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
import groovy.json.JsonSlurper
22
dependencies {
3-
implementation(name:'widgets-release', ext:'aar')
3+
if (hasProperty("tempBuild")) {
4+
implementation(name:'widgets-release', ext:'aar')
5+
}
46
implementation "androidx.annotation:annotation:1.1.0"
57
}
68
repositories {
7-
def widgetsDir = "$USER_PROJECT_ROOT/node_modules/@nativescript/core/platforms/android"
8-
def appPackageJsonFile = file("$USER_PROJECT_ROOT/package.json")
9-
if (appPackageJsonFile.exists()) {
10-
def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
11-
if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
12-
widgetsDir = "$USER_PROJECT_ROOT/node_modules/@akylas/nativescript/platforms/android"
9+
if (hasProperty("tempBuild")) {
10+
def widgetsDir = "$USER_PROJECT_ROOT/node_modules/@nativescript/core/platforms/android"
11+
def appPackageJsonFile = file("$USER_PROJECT_ROOT/package.json")
12+
if (appPackageJsonFile.exists()) {
13+
def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
14+
if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
15+
widgetsDir = "$USER_PROJECT_ROOT/node_modules/@akylas/nativescript/platforms/android"
16+
}
17+
}
18+
flatDir {
19+
dirs "$widgetsDir"
1320
}
14-
}
15-
flatDir {
16-
dirs "$widgetsDir"
1721
}
1822
}

0 commit comments

Comments
 (0)