@nativescript/android 8.2.0-alpha.9 → 8.2.1

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.
@@ -11,10 +11,15 @@ import static org.gradle.internal.logging.text.StyledTextOutput.Style
11
11
  buildscript {
12
12
 
13
13
  def initialize = { ->
14
+ // set up our logger
15
+ project.ext.outLogger = services.get(StyledTextOutputFactory).create("colouredOutputLogger")
14
16
  def userDir = "${rootProject.projectDir}/../.."
15
17
  apply from: "$rootDir/gradle-helpers/user_properties_reader.gradle"
16
18
  apply from: "$rootDir/gradle-helpers/paths.gradle"
17
19
  rootProject.ext.userDefinedGradleProperties = getUserProperties("${getAppResourcesPath(userDir)}/Android")
20
+
21
+ loadPropertyFile("$rootDir/additional_gradle.properties")
22
+
18
23
  if (rootProject.hasProperty("userDefinedGradleProperties")) {
19
24
  rootProject.ext.userDefinedGradleProperties.each { entry ->
20
25
  def propertyName = entry.getKey()
@@ -23,7 +28,6 @@ buildscript {
23
28
  }
24
29
  }
25
30
 
26
-
27
31
  // the build script will not work with previous versions of the CLI (3.1 or earlier)
28
32
  def dependenciesJson = file("$rootDir/dependencies.json")
29
33
  if (!dependenciesJson.exists()) {
@@ -43,10 +47,6 @@ version of the {N} CLI install a previous version of the runtime package - 'tns
43
47
  project.ext.PLATFORMS_ANDROID = "platforms/android"
44
48
  project.ext.USER_PROJECT_ROOT = "$rootDir/../.."
45
49
 
46
-
47
-
48
- project.ext.outLogger = services.get(StyledTextOutputFactory).create("colouredOutputLogger")
49
-
50
50
  project.ext.getAppPath = { ->
51
51
  def relativePathToApp = "app"
52
52
  def nsConfigFile = file("$USER_PROJECT_ROOT/nsconfig.json")
@@ -99,6 +99,16 @@ version of the {N} CLI install a previous version of the runtime package - 'tns
99
99
 
100
100
  }
101
101
 
102
+ def applyBeforePluginGradleConfiguration = { ->
103
+ def appResourcesPath = getAppResourcesPath()
104
+ def pathToBeforePluginGradle = "$appResourcesPath/Android/before-plugins.gradle"
105
+ def beforePluginGradle = file(pathToBeforePluginGradle)
106
+ if (beforePluginGradle.exists()) {
107
+ outLogger.withStyle(Style.SuccessHeader).println "\t + applying user-defined configuration from ${beforePluginGradle}"
108
+ apply from: pathToBeforePluginGradle
109
+ }
110
+ }
111
+
102
112
  def applyBuildScriptConfigurations = { ->
103
113
  def absolutePathToAppResources = getAppResourcesPath()
104
114
  def pathToBuildScriptGradle = "$absolutePathToAppResources/Android/rootbuildscript.gradle"
@@ -120,10 +130,10 @@ version of the {N} CLI install a previous version of the runtime package - 'tns
120
130
 
121
131
  initialize()
122
132
  applyBuildScriptConfigurations()
133
+ applyBeforePluginGradleConfiguration()
123
134
 
124
- def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${kotlin_version}"
125
- }
126
- def computeBuildToolsVersion = { -> project.hasProperty("androidBuildToolsVersion") ? androidBuildToolsVersion : "${ANDRIOD_BUILD_TOOLS_VERSION}"}
135
+ def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${ns_default_kotlin_version}" }
136
+ def computeBuildToolsVersion = { -> project.hasProperty("androidBuildToolsVersion") ? androidBuildToolsVersion : "${NS_DEFAULT_ANDROID_BUILD_TOOLS_VERSION}" }
127
137
  def kotlinVersion = computeKotlinVersion()
128
138
  def androidBuildToolsVersion = computeBuildToolsVersion()
129
139
 
@@ -1,6 +1,6 @@
1
- #Sun Jan 31 00:08:10 AST 2021
1
+ #Sat Mar 05 12:37:00 CET 2022
2
2
  distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
@@ -1,3 +1,5 @@
1
+ import static org.gradle.internal.logging.text.StyledTextOutput.Style
2
+
1
3
  def GRADLE_PROPERTIES_FILENAME = "gradle.properties"
2
4
 
3
5
  def getFile = { dir, filename ->
@@ -9,6 +11,28 @@ def getPropertyFile = { dir ->
9
11
  return getFile(dir, GRADLE_PROPERTIES_FILENAME)
10
12
  }
11
13
 
14
+ def loadPropertyFile = { path ->
15
+ try {
16
+ if(project.hasProperty("loadedProperties_${path}")) {
17
+ logger.info "\t + gradle properties already loaded. SKIPPING"
18
+ } else {
19
+ logger.info "\t + trying to load gradle properties from \"$path\""
20
+
21
+ Properties properties = new Properties()
22
+ properties.load(new FileInputStream("$path"))
23
+ properties.each { prop ->
24
+ logger.info "\t + [$path] setting ${prop.key} = ${prop.value}"
25
+ project.ext.set(prop.key, prop.value)
26
+ }
27
+ project.ext.set("loadedProperties_${path}", true)
28
+
29
+ outLogger.withStyle(Style.SuccessHeader).println "\t + loaded gradle properties from \"$path\""
30
+ }
31
+ } catch(Exception ex) {
32
+ logger.warn "\t + failed to load gradle properties from \"$path\". Error is: ${ex.getMessage()}"
33
+ }
34
+ }
35
+
12
36
  ext.getUserProperties = { dir ->
13
37
  def file = getPropertyFile(dir)
14
38
  if (!file) {
@@ -19,4 +43,6 @@ ext.getUserProperties = { dir ->
19
43
  properties.load(file.newInputStream())
20
44
 
21
45
  return properties
22
- }
46
+ }
47
+
48
+ ext.loadPropertyFile = loadPropertyFile
@@ -19,28 +19,28 @@ org.gradle.jvmargs=-Xmx16384M
19
19
  android.enableJetifier=true
20
20
  android.useAndroidX=true
21
21
 
22
-
23
- BUILD_TOOLS_VERSION=31.0.0
24
- COMPILE_SDK_VERSION=31
25
- MIN_SDK_VERSION=19
26
- ANDRIOD_BUILD_TOOLS_VERSION = 7.0.2
27
-
28
- gson_version = 2.8.6
29
- bcel_version = 6.2
30
- junit_version = 4.13.2
31
- mockito_core_version = 3.0.0
32
- kotlin_version = 1.5.21
33
- kotlinx_metadata_jvm_version = 0.3.0
34
- android_x_app_compat_version = 1.3.1
35
- android_x_material_version = 1.4.0
36
- android_x_exif_interface_version = 1.3.2
37
- android_x_view_pager_version = 1.0.0
38
- android_x_fragment_version = 1.3.6
39
- android_x_transition_version = 1.4.1
40
- android_x_multidex_version = 2.0.1
41
- commons_io_version = 2.6
42
- spotbugs_version = 3.1.12
43
- google_java_format_version = 1.6
44
- json_version = 20180813
45
- asm_util_version = 7.0
46
- asm_version = 7.0
22
+ # Default versions used throughout the gradle configurations
23
+ NS_DEFAULT_BUILD_TOOLS_VERSION=31.0.0
24
+ NS_DEFAULT_COMPILE_SDK_VERSION=31
25
+ NS_DEFAULT_MIN_SDK_VERSION=17
26
+ NS_DEFAULT_ANDROID_BUILD_TOOLS_VERSION=7.1.2
27
+
28
+ ns_default_androidx_appcompat_version = 1.4.1
29
+ ns_default_androidx_exifinterface_version = 1.3.3
30
+ ns_default_androidx_fragment_version = 1.4.1
31
+ ns_default_androidx_material_version = 1.5.0
32
+ ns_default_androidx_multidex_version = 2.0.1
33
+ ns_default_androidx_transition_version = 1.4.1
34
+ ns_default_androidx_viewpager_version = 1.0.0
35
+ ns_default_asm_util_version = 7.0
36
+ ns_default_asm_version = 7.0
37
+ ns_default_bcel_version = 6.5.0
38
+ ns_default_commons_io_version = 2.6
39
+ ns_default_google_java_format_version = 1.6
40
+ ns_default_gson_version = 2.9.0
41
+ ns_default_json_version = 20180813
42
+ ns_default_junit_version = 4.13.2
43
+ ns_default_kotlin_version = 1.6.0
44
+ ns_default_kotlinx_metadata_jvm_version = 0.4.2
45
+ ns_default_mockito_core_version = 3.0.0
46
+ ns_default_spotbugs_version = 3.1.12
@@ -1,5 +1,5 @@
1
1
  {
2
- "v8Version": "9.2.230.18",
3
- "ndkRevision": "22.1.7171670",
2
+ "v8Version": "8.3.110.9",
3
+ "ndkRevision": "21.1.6352462",
4
4
  "mksnapshotParams": "--profile_deserialization --turbo_instruction_scheduling --target_os=android --no-native-code-counters"
5
5
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nativescript/android",
3
3
  "description": "NativeScript Runtime for Android",
4
- "version": "8.2.0-alpha.9",
4
+ "version": "8.2.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/NativeScript/android-runtime.git"
@@ -10,18 +10,19 @@
10
10
  "**/*"
11
11
  ],
12
12
  "version_info": {
13
- "v8": "9.7.106.13",
14
- "gradle": "7.0.2",
15
- "gradleAndroid": "7.0.4",
16
- "ndk": "r22",
17
- "ndkApiLevel": "19",
13
+ "v8": "8.3.110.9",
14
+ "gradle": "7.4",
15
+ "gradleAndroid": "7.1.2",
16
+ "ndk": "r21",
17
+ "ndkApiLevel": "122",
18
18
  "minSdk": "17",
19
- "compileSdk": "30",
20
- "buildTools": "30.0.2",
19
+ "compileSdk": "31",
20
+ "buildTools": "31.0.0",
21
21
  "kotlin": "1.6.0"
22
22
  },
23
- "publishConfig": {
24
- "tag": "alpha",
25
- "access": "public"
23
+ "// this gradle key is here for backwards compatibility - we'll phase it out slowly...": "",
24
+ "gradle": {
25
+ "version": "7.4",
26
+ "android": "7.1.2"
26
27
  }
27
28
  }