stream-chat-react-native 9.8.2 → 9.8.3-beta.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.
@@ -20,7 +20,13 @@ def isNewArchitectureEnabled() {
20
20
  }
21
21
 
22
22
  apply plugin: "com.android.library"
23
- apply plugin: "kotlin-android"
23
+ // AGP 9 ships built-in Kotlin support and registers the `kotlin` extension
24
+ // itself. Applying the Kotlin plugin on top of it fails configuration with
25
+ // "Cannot add extension with name 'kotlin'". Only apply it when nothing has
26
+ // registered that extension yet.
27
+ if (project.extensions.findByName('kotlin') == null) {
28
+ apply plugin: "kotlin-android"
29
+ }
24
30
 
25
31
 
26
32
  def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
@@ -73,16 +79,13 @@ android {
73
79
  }
74
80
 
75
81
  compileOptions {
76
- // Must match the Kotlin jvmTarget below. AGP 9 (React Native 0.87) fails the build on an
77
- // inconsistent JVM-target between the Java and Kotlin compilation tasks.
82
+ // Must match the Kotlin jvmTarget set on the KotlinCompile tasks below: an inconsistent
83
+ // JVM-target between the Java and Kotlin compilation tasks fails the build. On AGP 9 this
84
+ // is also what AGP's built-in Kotlin derives the Kotlin jvmTarget from.
78
85
  sourceCompatibility JavaVersion.VERSION_17
79
86
  targetCompatibility JavaVersion.VERSION_17
80
87
  }
81
88
 
82
- kotlinOptions {
83
- jvmTarget = "17"
84
- }
85
-
86
89
  sourceSets {
87
90
  main {
88
91
  if (isNewArchitectureEnabled()) {
@@ -135,6 +138,12 @@ tasks.matching { it.name == "preBuild" }.configureEach {
135
138
 
136
139
  tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
137
140
  dependsOn("syncSharedShimmerSources")
141
+ // Set here rather than via `android.kotlinOptions`: that DSL is contributed by the Kotlin
142
+ // Gradle plugin, which is deliberately not applied when AGP registers the `kotlin`
143
+ // extension itself (see the guard at the top of this file). This form works either way.
144
+ compilerOptions {
145
+ jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
146
+ }
138
147
  }
139
148
 
140
149
  repositories {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native",
3
3
  "description": "The official React Native SDK for Stream Chat, a service for building chat applications",
4
- "version": "9.8.2",
4
+ "version": "9.8.3-beta.2",
5
5
  "homepage": "https://www.npmjs.com/package/stream-chat-react-native",
6
6
  "author": {
7
7
  "company": "Stream.io Inc",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "es6-symbol": "^3.1.3",
32
32
  "mime": "^4.0.7",
33
- "stream-chat-react-native-core": "9.8.2"
33
+ "stream-chat-react-native-core": "9.8.3-beta.2"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@react-native-camera-roll/camera-roll": ">=7.9.0",