codeplay-common 1.3.9 → 1.4.1
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.
|
@@ -233,13 +233,13 @@ const newCode = `@Override
|
|
|
233
233
|
if (!result) {
|
|
234
234
|
// If no one handled it, handle it ourselves!
|
|
235
235
|
|
|
236
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
236
|
+
/*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
237
237
|
if (detail.didCrash()) {
|
|
238
238
|
//Log.e("CapacitorWebView", "WebView crashed internally!");
|
|
239
239
|
} else {
|
|
240
240
|
//Log.w("CapacitorWebView", "WebView was killed by system (low memory) internally!");
|
|
241
241
|
}
|
|
242
|
-
}
|
|
242
|
+
}*/
|
|
243
243
|
|
|
244
244
|
view.post(() -> {
|
|
245
245
|
Toast.makeText(view.getContext(), "Reloading due to low memory issue", Toast.LENGTH_SHORT).show();
|
|
@@ -308,6 +308,44 @@ if (updated) {
|
|
|
308
308
|
|
|
309
309
|
|
|
310
310
|
|
|
311
|
+
// To resolve the kotlin version issue, we need to update the kotlin version in the build.gradle file START
|
|
312
|
+
|
|
313
|
+
// Build the path dynamically like you requested
|
|
314
|
+
const gradlePath = path.join(
|
|
315
|
+
process.cwd(),
|
|
316
|
+
'android',
|
|
317
|
+
'build.gradle'
|
|
318
|
+
);
|
|
319
|
+
|
|
320
|
+
// Read the existing build.gradle
|
|
321
|
+
let gradleContent = fs.readFileSync(gradlePath, 'utf8');
|
|
322
|
+
|
|
323
|
+
// Add `ext.kotlin_version` if it's not already there
|
|
324
|
+
if (!gradleContent.includes('ext.kotlin_version')) {
|
|
325
|
+
gradleContent = gradleContent.replace(
|
|
326
|
+
/buildscript\s*{/,
|
|
327
|
+
`buildscript {\n ext.kotlin_version = '2.1.0'`
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// Add Kotlin classpath if it's not already there
|
|
332
|
+
if (!gradleContent.includes('org.jetbrains.kotlin:kotlin-gradle-plugin')) {
|
|
333
|
+
gradleContent = gradleContent.replace(
|
|
334
|
+
/dependencies\s*{([\s\S]*?)classpath 'com.android.tools.build:gradle:8.7.2'/,
|
|
335
|
+
`dependencies {\n classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")\n$1classpath 'com.android.tools.build:gradle:8.7.2'`
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Write back the modified content
|
|
340
|
+
fs.writeFileSync(gradlePath, gradleContent, 'utf8');
|
|
341
|
+
|
|
342
|
+
console.log('✅ Kotlin version updated in build.gradle.');
|
|
343
|
+
|
|
344
|
+
// To resolve the kotlin version issue, we need to update the kotlin version in the build.gradle file END
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
311
349
|
|
|
312
350
|
|
|
313
351
|
|