@nativescript/android 8.1.0 → 8.2.0-alpha.2

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.
@@ -23,13 +23,17 @@
23
23
 
24
24
  import groovy.io.FileType
25
25
  import groovy.json.JsonSlurper
26
+ import org.apache.commons.io.FileUtils
26
27
 
27
28
  import javax.inject.Inject
28
29
  import java.nio.file.Files
29
30
  import java.nio.file.Paths
30
31
  import java.nio.file.StandardCopyOption
31
32
  import java.security.MessageDigest
32
- import org.gradle.internal.logging.text.StyledTextOutputFactory
33
+
34
+ import java.util.jar.JarEntry
35
+ import java.util.jar.JarFile
36
+
33
37
  import static org.gradle.internal.logging.text.StyledTextOutput.Style
34
38
 
35
39
  apply plugin: "com.android.application"
@@ -41,7 +45,7 @@ def enableKotlin = (project.hasProperty("useKotlin") && project.useKotlin == "tr
41
45
 
42
46
  if (enableKotlin) {
43
47
  apply plugin: 'kotlin-android'
44
- apply plugin: 'kotlin-android-extensions'
48
+ apply plugin: 'kotlin-parcelize'
45
49
  }
46
50
 
47
51
  def onlyX86 = project.hasProperty("onlyX86")
@@ -78,11 +82,11 @@ def METADATA_OUT_PATH = "$projectDir/src/main/assets/metadata"
78
82
  def pluginsJarLibraries = new LinkedList<String>()
79
83
  def allJarLibraries = new LinkedList<String>()
80
84
 
81
- def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "1.3.41" }
82
- def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 29 }
83
- def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : 29 }
85
+ def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${kotlin_version}" }
86
+ def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : COMPILE_SDK_VERSION as int }
87
+ def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : COMPILE_SDK_VERSION as int }
84
88
  def computeBuildToolsVersion = { ->
85
- project.hasProperty("buildToolsVersion") ? buildToolsVersion : "29.0.2"
89
+ project.hasProperty("buildToolsVersion") ? buildToolsVersion : BUILD_TOOLS_VERSION as String
86
90
  }
87
91
 
88
92
  def enableAnalytics = (project.hasProperty("gatherAnalyticsData") && project.gatherAnalyticsData == "true")
@@ -97,76 +101,6 @@ if (enableAnalytics) {
97
101
  project.ext.selectedBuildType = project.hasProperty("release") ? "release" : "debug"
98
102
 
99
103
  buildscript {
100
- // we have moved these initializations here as we need getAppResourcesPath to search for buildscript.gradle files,
101
- // but the buildscript is executed before executing anything else from the gradle file
102
- def initialize = { ->
103
- // the build script will not work with previous versions of the CLI (3.1 or earlier)
104
- def dependenciesJson = file("$rootDir/dependencies.json")
105
- if (!dependenciesJson.exists()) {
106
- throw new BuildCancelledException("""
107
- 'dependencies.json' file not found. Check whether the NativeScript CLI has prepared the project beforehand,
108
- and that your NativeScript version is 3.3, or a more recent one. To build an android project with the current
109
- version of the {N} CLI install a previous version of the runtime package - 'tns platform add android@3.2'.
110
- """)
111
- }
112
-
113
- project.ext.extractedDependenciesDir = "${project.buildDir}/exploded-dependencies"
114
- project.ext.cleanupAllJarsTimestamp = "${project.buildDir}/cleanupAllJars.timestamp"
115
- project.ext.extractAllJarsTimestamp = "${project.buildDir}/extractAllJars.timestamp"
116
- project.ext.nativescriptDependencies = new JsonSlurper().parseText(dependenciesJson.text)
117
- project.ext.PLATFORMS_ANDROID = "platforms/android"
118
- project.ext.USER_PROJECT_ROOT = "$rootDir/../.."
119
- project.ext.outLogger = services.get(StyledTextOutputFactory).create("colouredOutputLogger")
120
-
121
- project.ext.getAppPath = { ->
122
- def relativePathToApp = "app"
123
- def nsConfigFile = file("$USER_PROJECT_ROOT/nsconfig.json")
124
- def nsConfig
125
-
126
- if (nsConfigFile.exists()) {
127
- nsConfig = new JsonSlurper().parseText(nsConfigFile.getText("UTF-8"))
128
- }
129
-
130
- if (project.hasProperty("appPath")) {
131
- // when appPath is passed through -PappPath=/path/to/app
132
- // the path could be relative or absolute - either case will work
133
- relativePathToApp = appPath
134
- } else if (nsConfig != null && nsConfig.appPath != null) {
135
- relativePathToApp = nsConfig.appPath
136
- }
137
-
138
- project.ext.appPath = java.nio.file.Paths.get(USER_PROJECT_ROOT).resolve(relativePathToApp).toAbsolutePath()
139
-
140
- return project.ext.appPath
141
- }
142
-
143
- project.ext.getAppResourcesPath = { ->
144
- def relativePathToAppResources
145
- def absolutePathToAppResources
146
- def nsConfigFile = file("$USER_PROJECT_ROOT/nsconfig.json")
147
- def nsConfig
148
-
149
- if (nsConfigFile.exists()) {
150
- nsConfig = new JsonSlurper().parseText(nsConfigFile.getText("UTF-8"))
151
- }
152
-
153
- if (project.hasProperty("appResourcesPath")) {
154
- // when appResourcesPath is passed through -PappResourcesPath=/path/to/App_Resources
155
- // the path could be relative or absolute - either case will work
156
- relativePathToAppResources = appResourcesPath
157
- absolutePathToAppResources = java.nio.file.Paths.get(USER_PROJECT_ROOT).resolve(relativePathToAppResources).toAbsolutePath()
158
- } else if (nsConfig != null && nsConfig.appResourcesPath != null) {
159
- relativePathToAppResources = nsConfig.appResourcesPath
160
- absolutePathToAppResources = java.nio.file.Paths.get(USER_PROJECT_ROOT).resolve(relativePathToAppResources).toAbsolutePath()
161
- } else {
162
- absolutePathToAppResources = "${getAppPath()}/App_Resources"
163
- }
164
-
165
- project.ext.appResourcesPath = absolutePathToAppResources
166
-
167
- return absolutePathToAppResources
168
- }
169
- }
170
104
  def applyBuildScriptConfigurations = { ->
171
105
  def absolutePathToAppResources = getAppResourcesPath()
172
106
  def pathToBuildScriptGradle = "$absolutePathToAppResources/Android/buildscript.gradle"
@@ -185,8 +119,6 @@ version of the {N} CLI install a previous version of the runtime package - 'tns
185
119
  }
186
120
  }
187
121
  }
188
-
189
- initialize()
190
122
  applyBuildScriptConfigurations()
191
123
  }
192
124
  ////////////////////////////////////////////////////////////////////////////////////
@@ -266,7 +198,7 @@ android {
266
198
 
267
199
  defaultConfig {
268
200
  def manifest = new XmlSlurper().parse(file(android.sourceSets.main.manifest.srcFile))
269
- def minSdkVer = manifest."uses-sdk"."@android:minSdkVersion".text() ?: 17
201
+ def minSdkVer = manifest."uses-sdk"."@android:minSdkVersion".text() ?: MIN_SDK_VERSION
270
202
  minSdkVersion minSdkVer
271
203
  targetSdkVersion computeTargetSdkVersion()
272
204
  ndk {
@@ -276,9 +208,6 @@ android {
276
208
  abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
277
209
  }
278
210
  }
279
- dexOptions {
280
- jumboMode = true
281
- }
282
211
  }
283
212
 
284
213
  compileOptions {
@@ -373,54 +302,55 @@ repositories {
373
302
  }
374
303
 
375
304
  dependencies {
376
- def androidXLegacyVersion = "1.0.0"
377
- if (project.hasProperty("androidXLegacy")) {
378
- androidXLegacyVersion = androidXLegacy
379
- outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.legacy:legacy-support-v4:$androidXLegacyVersion"
380
- }
381
305
 
382
- def androidXAppCompatVersion = "1.1.0"
306
+ def androidXAppCompatVersion = "${android_x_app_compat_version}"
383
307
  if (project.hasProperty("androidXAppCompat")) {
384
308
  androidXAppCompatVersion = androidXAppCompat
385
309
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.appcompat:appcompat:$androidXAppCompatVersion"
386
310
  }
387
311
 
388
- def androidXMaterialVersion = "1.1.0"
312
+ def androidXMaterialVersion = "${android_x_material_version}"
389
313
  if (project.hasProperty("androidXMaterial")) {
390
314
  androidXMaterialVersion = androidXMaterial
391
315
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library com.google.android.material:material:$androidXMaterialVersion"
392
316
  }
393
317
 
394
- def androidXExifInterfaceVersion = "1.2.0"
318
+ def androidXExifInterfaceVersion = "${android_x_exif_interface_version}"
395
319
  if (project.hasProperty("androidXExifInterface")) {
396
320
  androidXExifInterfaceVersion = androidXExifInterface
397
321
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.exifinterface:exifinterface:$androidXExifInterfaceVersion"
398
322
  }
399
323
 
400
- def androidXViewPagerVersion = "1.0.0"
324
+ def androidXViewPagerVersion = "${android_x_view_pager_version}"
401
325
  if (project.hasProperty("androidXViewPager")) {
402
326
  androidXViewPagerVersion = androidXViewPager
403
327
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.viewpager2:viewpager2:$androidXViewPagerVersion"
404
328
  }
405
329
 
406
- def androidXFragmentVersion = "1.2.5"
330
+ def androidXFragmentVersion = "${android_x_fragment_version}"
407
331
  if (project.hasProperty("androidXFragment")) {
408
332
  androidXFragmentVersion = androidXFragment
409
333
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.fragment:fragment:$androidXFragmentVersion"
410
334
  }
411
335
 
412
- def androidXTransitionVersion = "1.3.1"
336
+ def androidXTransitionVersion = "${android_x_transition_version}"
413
337
  if (project.hasProperty("androidXTransition")) {
414
338
  androidXTransitionVersion = androidXTransition
415
339
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.transition:transition:$androidXTransitionVersion"
416
340
  }
417
341
 
418
- implementation "androidx.multidex:multidex:2.0.1"
419
- implementation "androidx.legacy:legacy-support-v4:$androidXLegacyVersion"
342
+ def androidXMultidexVersion = "${android_x_multidex_version}"
343
+ if (project.hasProperty("androidXMultidex")) {
344
+ androidXMultidexVersion = androidXMultidex
345
+ outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.multidex:multidex:$androidXMultidexVersion"
346
+ }
347
+
348
+ implementation "androidx.multidex:multidex:$androidXMultidexVersion"
420
349
  implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
421
350
  implementation "com.google.android.material:material:$androidXMaterialVersion"
422
351
  implementation "androidx.exifinterface:exifinterface:$androidXExifInterfaceVersion"
423
352
  implementation "androidx.viewpager2:viewpager2:$androidXViewPagerVersion"
353
+ //noinspection KtxExtensionAvailable
424
354
  implementation "androidx.fragment:fragment:$androidXFragmentVersion"
425
355
  implementation "androidx.transition:transition:$androidXTransitionVersion"
426
356
 
@@ -520,7 +450,7 @@ if (failOnCompilationWarningsEnabled()) {
520
450
  }
521
451
  }
522
452
 
523
- tasks.whenTaskAdded({ org.gradle.api.DefaultTask currentTask ->
453
+ tasks.whenTaskAdded({ DefaultTask currentTask ->
524
454
  if (currentTask =~ /generate.+BuildConfig/) {
525
455
  currentTask.finalizedBy(extractAllJars)
526
456
  extractAllJars.finalizedBy(collectAllJars)
@@ -530,7 +460,7 @@ tasks.whenTaskAdded({ org.gradle.api.DefaultTask currentTask ->
530
460
  currentTask.finalizedBy(buildMetadata)
531
461
  }
532
462
  if (currentTask =~ /merge.*Assets/) {
533
- currentTask.shouldRunAfter(buildMetadata)
463
+ currentTask.dependsOn(buildMetadata)
534
464
  }
535
465
  if (currentTask =~ /assemble.*Debug/ || currentTask =~ /assemble.*Release/) {
536
466
  currentTask.finalizedBy("validateAppIdMatch")
@@ -578,10 +508,10 @@ def explodeAar(File compileDependency, File outputDir) {
578
508
  logger.info("explodeAar: Extracting ${compileDependency.path} -> ${outputDir.path}")
579
509
 
580
510
  if (compileDependency.name.endsWith(".aar")) {
581
- java.util.jar.JarFile jar = new java.util.jar.JarFile(compileDependency)
511
+ JarFile jar = new JarFile(compileDependency)
582
512
  Enumeration enumEntries = jar.entries()
583
513
  while (enumEntries.hasMoreElements()) {
584
- java.util.jar.JarEntry file = (java.util.jar.JarEntry) enumEntries.nextElement()
514
+ JarEntry file = (JarEntry) enumEntries.nextElement()
585
515
  if (file.name.endsWith(".jar")) {
586
516
  def targetFile = new File(outputDir, file.name)
587
517
  InputStream inputStream = jar.getInputStream(file)
@@ -629,34 +559,15 @@ def getMergedAssetsOutputPath() {
629
559
 
630
560
  // Discover all jars and dynamically create tasks for the extraction of each of them
631
561
  project.ext.allJars = []
632
- afterEvaluate { project ->
633
- def buildType = project.selectedBuildType == "release" ? "Release" : "Debug"
634
- def jars = []
635
- def artifactType = Attribute.of('artifactType', String)
636
- configurations.all { config ->
637
- if (config.name.toLowerCase().endsWith("${buildType}RuntimeClasspath".toLowerCase())) {
638
- config.incoming.artifactView {
639
- attributes {
640
- it.attribute(artifactType, 'jar')
641
- }
642
- }.artifacts.each {
643
- processJar(it.file, jars)
644
- }
645
-
646
- def projectDependencies = config.getAllDependencies().withType(ProjectDependency)
647
- def dependentProjects = projectDependencies*.dependencyProject
648
- dependentProjects.findAll {
649
- // if there's a project dependency search for its result jar file in the build/intermediates/runtime_library_classes folder
650
- // this is the output folder in gradle 5.1.1, but it can be changed in the future versions of gradle
651
- def jarDir = new File("${it.getBuildDir()}/intermediates/runtime_library_classes/${buildType.toLowerCase()}")
652
- if (jarDir.exists()) {
653
- jarDir.eachFileRecurse(FileType.FILES) { file ->
654
- if (file.path.endsWith(".jar")) {
655
- processJar(file, jars)
656
- }
657
- }
658
- } else {
659
- outLogger.withStyle(Style.Info).println "WARNING: Folder ${jarDir.path} does not exists, the dependent project's classes won't be included in the metadata"
562
+ allprojects {
563
+ afterEvaluate { project ->
564
+ def buildType = project.selectedBuildType
565
+ def jars = []
566
+ def artifactType = Attribute.of('artifactType', String)
567
+ android.applicationVariants.all { variant ->
568
+ if (variant.buildType.name == buildType) {
569
+ variant.getCompileClasspath().each { fileDependency ->
570
+ processJar(fileDependency, jars)
660
571
  }
661
572
  }
662
573
  }
@@ -718,7 +629,7 @@ task cleanupAllJars {
718
629
  // An old directory which is no longer a dependency (e.g. orphaned by a deleted plugin)
719
630
  if (!allDests.contains(it.name)) {
720
631
  logger.info("Task cleanupAllJars: Deleting orphaned ${it.path}")
721
- org.apache.commons.io.FileUtils.deleteDirectory(it)
632
+ FileUtils.deleteDirectory(it)
722
633
  }
723
634
  }
724
635
  }
@@ -836,7 +747,7 @@ task buildMetadata(type: BuildToolTask) {
836
747
 
837
748
  def generatedClasses = new LinkedList<String>()
838
749
  for (File subDir : classesSubDirs) {
839
- if (subDir.getName().equals(selectedBuildType)) {
750
+ if (subDir.getName() == selectedBuildType) {
840
751
  generatedClasses.add(subDir.getAbsolutePath())
841
752
  }
842
753
  }
@@ -1,3 +1,11 @@
1
+ import org.gradle.internal.logging.text.StyledTextOutputFactory
2
+
3
+ import java.nio.file.Paths
4
+
5
+ import org.gradle.internal.logging.text.StyledTextOutputFactory
6
+ import groovy.json.JsonSlurper
7
+ import static org.gradle.internal.logging.text.StyledTextOutput.Style
8
+
1
9
  // Top-level build file where you can add configuration options common to all sub-projects/modules.
2
10
 
3
11
  buildscript {
@@ -14,27 +22,126 @@ buildscript {
14
22
  project.ext.set(propertyName, propertyValue)
15
23
  }
16
24
  }
25
+
26
+
27
+ // the build script will not work with previous versions of the CLI (3.1 or earlier)
28
+ def dependenciesJson = file("$rootDir/dependencies.json")
29
+ if (!dependenciesJson.exists()) {
30
+ throw new BuildCancelledException("""
31
+ 'dependencies.json' file not found. Check whether the NativeScript CLI has prepared the project beforehand,
32
+ and that your NativeScript version is 3.3, or a more recent one. To build an android project with the current
33
+ version of the {N} CLI install a previous version of the runtime package - 'tns platform add android@3.2'.
34
+ """)
35
+ }
36
+
37
+ project.ext.extractedDependenciesDir = "${project.buildDir}/exploded-dependencies"
38
+ project.ext.cleanupAllJarsTimestamp = "${project.buildDir}/cleanupAllJars.timestamp"
39
+ project.ext.extractAllJarsTimestamp = "${project.buildDir}/extractAllJars.timestamp"
40
+
41
+
42
+ project.ext.nativescriptDependencies = new JsonSlurper().parseText(dependenciesJson.text)
43
+ project.ext.PLATFORMS_ANDROID = "platforms/android"
44
+ project.ext.USER_PROJECT_ROOT = "$rootDir/../.."
45
+
46
+
47
+
48
+ project.ext.outLogger = services.get(StyledTextOutputFactory).create("colouredOutputLogger")
49
+
50
+ project.ext.getAppPath = { ->
51
+ def relativePathToApp = "app"
52
+ def nsConfigFile = file("$USER_PROJECT_ROOT/nsconfig.json")
53
+ def nsConfig
54
+
55
+ if (nsConfigFile.exists()) {
56
+ nsConfig = new JsonSlurper().parseText(nsConfigFile.getText("UTF-8"))
57
+ }
58
+
59
+ if (project.hasProperty("appPath")) {
60
+ // when appPath is passed through -PappPath=/path/to/app
61
+ // the path could be relative or absolute - either case will work
62
+ relativePathToApp = appPath
63
+ } else if (nsConfig != null && nsConfig.appPath != null) {
64
+ relativePathToApp = nsConfig.appPath
65
+ }
66
+
67
+ project.ext.appPath = Paths.get(USER_PROJECT_ROOT).resolve(relativePathToApp).toAbsolutePath()
68
+
69
+ return project.ext.appPath
70
+ }
71
+
72
+ project.ext.getAppResourcesPath = { ->
73
+ def relativePathToAppResources
74
+ def absolutePathToAppResources
75
+ def nsConfigFile = file("$USER_PROJECT_ROOT/nsconfig.json")
76
+ def nsConfig
77
+
78
+ if (nsConfigFile.exists()) {
79
+ nsConfig = new JsonSlurper().parseText(nsConfigFile.getText("UTF-8"))
80
+ }
81
+
82
+ if (project.hasProperty("appResourcesPath")) {
83
+ // when appResourcesPath is passed through -PappResourcesPath=/path/to/App_Resources
84
+ // the path could be relative or absolute - either case will work
85
+ relativePathToAppResources = appResourcesPath
86
+ absolutePathToAppResources = Paths.get(USER_PROJECT_ROOT).resolve(relativePathToAppResources).toAbsolutePath()
87
+ } else if (nsConfig != null && nsConfig.appResourcesPath != null) {
88
+ relativePathToAppResources = nsConfig.appResourcesPath
89
+ absolutePathToAppResources = Paths.get(USER_PROJECT_ROOT).resolve(relativePathToAppResources).toAbsolutePath()
90
+ } else {
91
+ absolutePathToAppResources = "${getAppPath()}/App_Resources"
92
+ }
93
+
94
+ project.ext.appResourcesPath = absolutePathToAppResources
95
+
96
+ return absolutePathToAppResources
97
+ }
98
+
99
+
17
100
  }
101
+
102
+ def applyBuildScriptConfigurations = { ->
103
+ def absolutePathToAppResources = getAppResourcesPath()
104
+ def pathToBuildScriptGradle = "$absolutePathToAppResources/Android/rootbuildscript.gradle"
105
+ def buildScriptGradle = file(pathToBuildScriptGradle)
106
+ if (buildScriptGradle.exists()) {
107
+ outLogger.withStyle(Style.SuccessHeader).println "\t + applying user-defined root buildscript from ${buildScriptGradle}"
108
+ apply from: pathToBuildScriptGradle, to: buildscript
109
+ }
110
+
111
+ nativescriptDependencies.each { dep ->
112
+ def pathToPluginBuildScriptGradle = "$rootDir/${dep.directory}/$PLATFORMS_ANDROID/rootbuildscript.gradle"
113
+ def pluginBuildScriptGradle = file(pathToPluginBuildScriptGradle)
114
+ if (pluginBuildScriptGradle.exists()) {
115
+ outLogger.withStyle(Style.SuccessHeader).println "\t + applying user-defined rootbuildscript from dependency ${pluginBuildScriptGradle}"
116
+ apply from: pathToPluginBuildScriptGradle, to: buildscript
117
+ }
118
+ }
119
+ }
120
+
18
121
  initialize()
122
+ applyBuildScriptConfigurations()
19
123
 
20
- def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "1.3.72"
124
+ def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${kotlin_version}"
21
125
  }
126
+ def computeBuildToolsVersion = { -> project.hasProperty("androidBuildToolsVersion") ? androidBuildToolsVersion : "7.0.2"}
22
127
  def kotlinVersion = computeKotlinVersion()
128
+ def androidBuildToolsVersion = computeBuildToolsVersion()
23
129
 
24
130
  repositories {
25
131
  google()
26
- jcenter()
132
+ mavenCentral()
27
133
  }
28
134
  dependencies {
29
- classpath 'com.android.tools.build:gradle:3.6.4'
135
+ classpath "com.android.tools.build:gradle:$androidBuildToolsVersion"
30
136
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
137
+ classpath group: 'org.codehaus.groovy', name: 'groovy-all', version: '3.0.8', ext: 'pom'
31
138
  }
32
139
  }
33
140
 
34
141
  allprojects {
35
142
  repositories {
36
143
  google()
37
- jcenter()
144
+ mavenCentral()
38
145
  }
39
146
  beforeEvaluate { project ->
40
147
  if (rootProject.hasProperty("userDefinedGradleProperties")) {
@@ -1,6 +1,6 @@
1
- #Tue May 12 21:42:57 CEST 2020
1
+ #Sun Jan 31 00:08:10 AST 2021
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-6.4-all.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
@@ -1,5 +1,7 @@
1
1
  import groovy.json.JsonSlurper
2
2
 
3
+ import java.nio.file.Paths
4
+
3
5
  ext.getAppPath = { userDir ->
4
6
  def relativePathToApp = "app"
5
7
  def nsConfigFile = file("$userDir/nsconfig.json")
@@ -17,7 +19,7 @@ ext.getAppPath = { userDir ->
17
19
  relativePathToApp = nsConfig.appPath
18
20
  }
19
21
 
20
- return java.nio.file.Paths.get(userDir).resolve(relativePathToApp).toAbsolutePath()
22
+ return Paths.get(userDir).resolve(relativePathToApp).toAbsolutePath()
21
23
  }
22
24
 
23
25
  ext.getAppResourcesPath = { userDir ->
@@ -34,10 +36,10 @@ ext.getAppResourcesPath = { userDir ->
34
36
  // when appResourcesPath is passed through -PappResourcesPath=/path/to/App_Resources
35
37
  // the path could be relative or absolute - either case will work
36
38
  relativePathToAppResources = ext.appResourcesPath
37
- absolutePathToAppResources = java.nio.file.Paths.get(userDir).resolve(relativePathToAppResources).toAbsolutePath()
39
+ absolutePathToAppResources = Paths.get(userDir).resolve(relativePathToAppResources).toAbsolutePath()
38
40
  } else if (nsConfig != null && nsConfig.appResourcesPath != null) {
39
41
  relativePathToAppResources = nsConfig.appResourcesPath
40
- absolutePathToAppResources = java.nio.file.Paths.get(userDir).resolve(relativePathToAppResources).toAbsolutePath()
42
+ absolutePathToAppResources = Paths.get(userDir).resolve(relativePathToAppResources).toAbsolutePath()
41
43
  } else {
42
44
  absolutePathToAppResources = "${getAppPath(userDir)}/App_Resources"
43
45
  }
@@ -18,3 +18,29 @@ org.gradle.jvmargs=-Xmx16384M
18
18
 
19
19
  android.enableJetifier=true
20
20
  android.useAndroidX=true
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
@@ -1,5 +1,5 @@
1
1
  {
2
- "v8Version": "8.3.110.9",
3
- "ndkRevision": "21.1.6352462",
2
+ "v8Version": "9.2.230.18",
3
+ "ndkRevision": "22.1.7171670",
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.1.0",
4
+ "version": "8.2.0-alpha.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/NativeScript/android-runtime.git"
@@ -9,13 +9,18 @@
9
9
  "files": [
10
10
  "**/*"
11
11
  ],
12
- "gradle": {
13
- "version": "6.4",
14
- "android": "3.6.4"
12
+ "versions": {
13
+ "v8": "9.2.230.18",
14
+ "gradle": "7.0.2",
15
+ "ndk": "r22",
16
+ "ndkApiLevel": "19",
17
+ "minSdk": "19",
18
+ "compileSdk": "31",
19
+ "buildTools": "31.0.0",
20
+ "kotlin": "1.5.21"
15
21
  },
16
- "android_ndk_version": "21b",
17
22
  "publishConfig": {
18
- "tag": "next",
23
+ "tag": "alpha",
19
24
  "access": "public"
20
25
  }
21
26
  }