@amplitude/session-replay-react-native 1.0.2-video-analytics-2.0 → 1.0.3-video-analytics-4.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.
@@ -18,7 +18,15 @@ if (findProject(':app') != null) {
18
18
  }
19
19
 
20
20
  apply plugin: "com.android.library"
21
- apply plugin: "kotlin-android"
21
+ // AGP 9 ships built-in Kotlin support and registers the `kotlin` extension
22
+ // itself. Applying the Kotlin plugin on top of it fails configuration with
23
+ // "Cannot add extension with name 'kotlin'". Asking for the extension covers
24
+ // every way built-in Kotlin can be turned on -- the global default, the
25
+ // android.builtInKotlin property, and the per-module com.android.built-in-kotlin
26
+ // plugin -- without reading an AGP version number.
27
+ if (project.extensions.findByName('kotlin') == null) {
28
+ apply plugin: "kotlin-android"
29
+ }
22
30
 
23
31
  if (isNewArchitectureEnabled()) {
24
32
  apply plugin: "com.facebook.react"
@@ -54,12 +62,18 @@ android {
54
62
 
55
63
  // New Arch compiles src/newarch (codegen spec + BaseReactPackage); Old Arch
56
64
  // compiles src/oldarch (hand-written spec + plain ReactPackage).
65
+ // Both directories hold .kt files, and AGP's built-in Kotlin does not read
66
+ // java.srcDirs for Kotlin sources, so each directory is mirrored into
67
+ // kotlin.srcDirs as well. Without that the sources are silently dropped and
68
+ // the build fails with "Unresolved reference".
57
69
  sourceSets {
58
70
  main {
59
71
  if (isNewArchitectureEnabled()) {
60
72
  java.srcDirs += ['src/newarch/java']
73
+ kotlin.srcDirs += ['src/newarch/java']
61
74
  } else {
62
75
  java.srcDirs += ['src/oldarch/java']
76
+ kotlin.srcDirs += ['src/oldarch/java']
63
77
  }
64
78
  }
65
79
  }
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VERSION = void 0;
7
- const VERSION = exports.VERSION = '1.0.2-video-analytics-2.0';
7
+ const VERSION = exports.VERSION = '1.0.3-video-analytics-4.0';
8
8
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.0.2-video-analytics-2.0';
1
+ export const VERSION = '1.0.3-video-analytics-4.0';
2
2
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.2-video-analytics-2.0";
1
+ export declare const VERSION = "1.0.3-video-analytics-4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/session-replay-react-native",
3
- "version": "1.0.2-video-analytics-2.0",
3
+ "version": "1.0.3-video-analytics-4.0",
4
4
  "description": "Amplitude Session Replay for React Native",
5
5
  "keywords": [
6
6
  "analytics",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.0.2-video-analytics-2.0';
1
+ export const VERSION = '1.0.3-video-analytics-4.0';