@nativescript/android 8.2.0-alpha.9 → 8.2.0-rc.0

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.
@@ -82,11 +82,11 @@ def METADATA_OUT_PATH = "$projectDir/src/main/assets/metadata"
82
82
  def pluginsJarLibraries = new LinkedList<String>()
83
83
  def allJarLibraries = new LinkedList<String>()
84
84
 
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 }
85
+ def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${ns_default_kotlin_version}" }
86
+ def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : NS_DEFAULT_COMPILE_SDK_VERSION as int }
87
+ def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : NS_DEFAULT_COMPILE_SDK_VERSION as int }
88
88
  def computeBuildToolsVersion = { ->
89
- project.hasProperty("buildToolsVersion") ? buildToolsVersion : BUILD_TOOLS_VERSION as String
89
+ project.hasProperty("buildToolsVersion") ? buildToolsVersion : NS_DEFAULT_BUILD_TOOLS_VERSION as String
90
90
  }
91
91
 
92
92
  def enableAnalytics = (project.hasProperty("gatherAnalyticsData") && project.gatherAnalyticsData == "true")
@@ -198,7 +198,7 @@ android {
198
198
 
199
199
  defaultConfig {
200
200
  def manifest = new XmlSlurper().parse(file(android.sourceSets.main.manifest.srcFile))
201
- def minSdkVer = manifest."uses-sdk"."@android:minSdkVersion".text() ?: MIN_SDK_VERSION
201
+ def minSdkVer = manifest."uses-sdk"."@android:minSdkVersion".text() ?: NS_DEFAULT_MIN_SDK_VERSION
202
202
  minSdkVersion minSdkVer
203
203
  targetSdkVersion computeTargetSdkVersion()
204
204
  ndk {
@@ -298,48 +298,50 @@ repositories {
298
298
  dirs pluginDependencies
299
299
  }
300
300
  }
301
+
301
302
  mavenCentral()
302
303
  }
303
304
 
304
305
  dependencies {
306
+ // println "\t ~ [DEBUG][app] build.gradle - ns_default_androidx_appcompat_version = ${ns_default_androidx_appcompat_version}..."
305
307
 
306
- def androidXAppCompatVersion = "${android_x_app_compat_version}"
308
+ def androidXAppCompatVersion = "${ns_default_androidx_appcompat_version}"
307
309
  if (project.hasProperty("androidXAppCompat")) {
308
310
  androidXAppCompatVersion = androidXAppCompat
309
311
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.appcompat:appcompat:$androidXAppCompatVersion"
310
312
  }
311
313
 
312
- def androidXMaterialVersion = "${android_x_material_version}"
314
+ def androidXMaterialVersion = "${ns_default_androidx_material_version}"
313
315
  if (project.hasProperty("androidXMaterial")) {
314
316
  androidXMaterialVersion = androidXMaterial
315
317
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library com.google.android.material:material:$androidXMaterialVersion"
316
318
  }
317
319
 
318
- def androidXExifInterfaceVersion = "${android_x_exif_interface_version}"
320
+ def androidXExifInterfaceVersion = "${ns_default_androidx_exifinterface_version}"
319
321
  if (project.hasProperty("androidXExifInterface")) {
320
322
  androidXExifInterfaceVersion = androidXExifInterface
321
323
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.exifinterface:exifinterface:$androidXExifInterfaceVersion"
322
324
  }
323
325
 
324
- def androidXViewPagerVersion = "${android_x_view_pager_version}"
326
+ def androidXViewPagerVersion = "${ns_default_androidx_viewpager_version}"
325
327
  if (project.hasProperty("androidXViewPager")) {
326
328
  androidXViewPagerVersion = androidXViewPager
327
329
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.viewpager2:viewpager2:$androidXViewPagerVersion"
328
330
  }
329
331
 
330
- def androidXFragmentVersion = "${android_x_fragment_version}"
332
+ def androidXFragmentVersion = "${ns_default_androidx_fragment_version}"
331
333
  if (project.hasProperty("androidXFragment")) {
332
334
  androidXFragmentVersion = androidXFragment
333
335
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.fragment:fragment:$androidXFragmentVersion"
334
336
  }
335
337
 
336
- def androidXTransitionVersion = "${android_x_transition_version}"
338
+ def androidXTransitionVersion = "${ns_default_androidx_transition_version}"
337
339
  if (project.hasProperty("androidXTransition")) {
338
340
  androidXTransitionVersion = androidXTransition
339
341
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.transition:transition:$androidXTransitionVersion"
340
342
  }
341
343
 
342
- def androidXMultidexVersion = "${android_x_multidex_version}"
344
+ def androidXMultidexVersion = "${ns_default_androidx_multidex_version}"
343
345
  if (project.hasProperty("androidXMultidex")) {
344
346
  androidXMultidexVersion = androidXMultidex
345
347
  outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.multidex:multidex:$androidXMultidexVersion"
@@ -347,7 +349,7 @@ dependencies {
347
349
 
348
350
  implementation "androidx.multidex:multidex:$androidXMultidexVersion"
349
351
  implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
350
- implementation "com.google.android.material:material:$androidXMaterialVersion"
352
+ debugImplementation "com.google.android.material:material:$androidXMaterialVersion"
351
353
  implementation "androidx.exifinterface:exifinterface:$androidXExifInterfaceVersion"
352
354
  implementation "androidx.viewpager2:viewpager2:$androidXViewPagerVersion"
353
355
  //noinspection KtxExtensionAvailable
@@ -462,6 +464,10 @@ tasks.whenTaskAdded({ DefaultTask currentTask ->
462
464
  if (currentTask =~ /merge.*Assets/) {
463
465
  currentTask.dependsOn(buildMetadata)
464
466
  }
467
+ // ensure buildMetadata is done before R8 to allow custom proguard from metadata
468
+ if (currentTask =~ /minify.*WithR8/) {
469
+ currentTask.dependsOn(buildMetadata)
470
+ }
465
471
  if (currentTask =~ /assemble.*Debug/ || currentTask =~ /assemble.*Release/) {
466
472
  currentTask.finalizedBy("validateAppIdMatch")
467
473
  }
@@ -156,8 +156,7 @@ class ErrorReport implements TabLayout.OnTabSelectedListener {
156
156
  static void startPendingErrorActivity(Context context, Intent intent) throws CanceledException {
157
157
  int flags = PendingIntent.FLAG_CANCEL_CURRENT;
158
158
  if (Build.VERSION.SDK_INT >= 31) {
159
- int FLAG_MUTABLE = 1<<25;
160
- flags = PendingIntent.FLAG_CANCEL_CURRENT | FLAG_MUTABLE;
159
+ flags = PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE;
161
160
  }
162
161
 
163
162
  PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, flags);
@@ -21,6 +21,7 @@
21
21
  <activity
22
22
  android:name="com.tns.NativeScriptActivity"
23
23
  android:label="@string/title_activity_kimera"
24
+ android:exported="true"
24
25
  android:configChanges="keyboardHidden|orientation|screenSize">
25
26
 
26
27
  <intent-filter>
@@ -2,5 +2,5 @@
2
2
  <resources>
3
3
  <color name="ns_primary">#F5F5F5</color>
4
4
  <color name="ns_primaryDark">#757575</color>
5
- <color name="ns_accent">#33B5E5</color>
5
+ <color name="ns_accent">#65adf1</color>
6
6
  </resources>
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <color name="ns_accent">#3d5afe</color>
3
+ <color name="ns_accent">#65adf1</color>
4
4
  </resources>