@dr33m/react-native-litert-lm 0.5.0 → 0.5.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.
- package/app.plugin.js +2 -7
- package/package.json +1 -1
package/app.plugin.js
CHANGED
|
@@ -30,18 +30,13 @@ function withLiteRTLM(config) {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// Android: Pin Kotlin Gradle plugin to 2.3.0
|
|
33
|
-
// The litertlm-android AAR uses Kotlin 2.3.0 metadata
|
|
34
|
-
//
|
|
35
|
-
// React Native's default Kotlin version (2.1.0) cannot read this metadata,
|
|
36
|
-
// so we must force the Kotlin Gradle plugin to 2.3.0 in the project-level
|
|
37
|
-
// build.gradle. This ensures the fix survives `expo prebuild --clean`.
|
|
33
|
+
// The litertlm-android AAR uses Kotlin 2.3.0 metadata which cannot be read
|
|
34
|
+
// by older compilers. This forces the project-level Kotlin plugin to 2.3.0.
|
|
38
35
|
config = withProjectBuildGradle(config, (config) => {
|
|
39
36
|
if (config.modResults.language === 'groovy') {
|
|
40
37
|
const contents = config.modResults.contents;
|
|
41
38
|
|
|
42
|
-
// Only add if not already pinned
|
|
43
39
|
if (!contents.includes("kotlin-gradle-plugin:2.3.0")) {
|
|
44
|
-
// Replace the unversioned kotlin-gradle-plugin classpath with a pinned one
|
|
45
40
|
config.modResults.contents = contents.replace(
|
|
46
41
|
"classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')",
|
|
47
42
|
"classpath('org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.0')"
|