@nativescript-community/gesturehandler 2.0.34 → 2.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/gesturehandler",
3
- "version": "2.0.34",
3
+ "version": "2.0.37",
4
4
  "description": "Declarative API exposing platform native touch and gesture system to NativeScript.",
5
5
  "main": "gesturehandler",
6
6
  "sideEffects": false,
@@ -48,5 +48,5 @@
48
48
  "dependencies": {
49
49
  "@nativescript-community/observable": "^2.0.10"
50
50
  },
51
- "gitHead": "0263de76f516937edf94ca59ea4d367c15c7fc75"
51
+ "gitHead": "03645d43dcbfa40b2253c111cd515d6634be5916"
52
52
  }
@@ -1,13 +1,13 @@
1
1
  import groovy.json.JsonSlurper
2
+
2
3
  dependencies {
3
- if (project.hasProperty("tempBuild")) {
4
- implementation(name:'widgets-release', ext:'aar')
5
- }
6
4
  implementation "androidx.annotation:annotation:1.1.0"
7
- }
8
- repositories {
5
+
9
6
  if (project.hasProperty("tempBuild")) {
10
- def widgetsDir = "$USER_PROJECT_ROOT/node_modules/@nativescript/core/platforms/android"
7
+ // we need to copy the code in both places as N main gradle system does not support top level code
8
+ // for now we support only @nativescript/core and @akylas/nativescript
9
+ // we should have a more generic way
10
+ def widgetsDir = "$USER_PROJECT_ROOT/node_modules/@nativescript/core/platforms/android"
11
11
  def appPackageJsonFile = file("$USER_PROJECT_ROOT/package.json")
12
12
  if (appPackageJsonFile.exists()) {
13
13
  def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
@@ -15,8 +15,29 @@ repositories {
15
15
  widgetsDir = "$USER_PROJECT_ROOT/node_modules/@akylas/nativescript/platforms/android"
16
16
  }
17
17
  }
18
- flatDir {
19
- dirs "$widgetsDir"
18
+
19
+ // if ui-mobile-base is provided as source the name is nativescript.aar
20
+ //else use widget-release.aar
21
+ if (file("$widgetsDir/widgets-release.aar").exists()) {
22
+ implementation(name:'widgets-release', ext:'aar')
23
+ } else {
24
+ implementation(name:'nativescript', ext:'aar')
25
+ }
26
+ }
27
+ }
28
+ repositories {
29
+ // we need to copy the code in both places as N main gradle system does not support top level code
30
+ // for now we support only @nativescript/core and @akylas/nativescript
31
+ // we should have a more generic way
32
+ def widgetsDir = "$USER_PROJECT_ROOT/node_modules/@nativescript/core/platforms/android"
33
+ def appPackageJsonFile = file("$USER_PROJECT_ROOT/package.json")
34
+ if (appPackageJsonFile.exists()) {
35
+ def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
36
+ if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
37
+ widgetsDir = "$USER_PROJECT_ROOT/node_modules/@akylas/nativescript/platforms/android"
20
38
  }
21
39
  }
22
- }
40
+ flatDir {
41
+ dirs "$widgetsDir"
42
+ }
43
+ }