This repository was archived by the owner on Mar 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 311
This repository was archived by the owner on Mar 19, 2025. It is now read-only.
getExtOrDefault KotlinVersionΒ #271
Copy link
Copy link
Open
Description
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch [email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-text-input-mask/android/build.gradle b/node_modules/react-native-text-input-mask/android/build.gradle
index c94f33f..ff67cac 100644
--- a/node_modules/react-native-text-input-mask/android/build.gradle
+++ b/node_modules/react-native-text-input-mask/android/build.gradle
@@ -26,8 +26,8 @@ android {
}
buildscript {
- ext {
- kotlinVersion = '1.4.31'
+ ext.safeExtGet = {prop, fallback ->
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
repositories {
jcenter()
@@ -36,7 +36,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinVersion}"
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.6.10')}"
}
}
@@ -53,5 +53,5 @@ repositories {
dependencies {
implementation 'com.facebook.react:react-native:+'
implementation 'com.redmadrobot:input-mask-android:6.0.0'
- implementation "org.jetbrains.kotlin:kotlin-stdlib:${project.ext.kotlinVersion}"
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:${safeExtGet('kotlinVersion', '1.6.10')}"
}
KianooshSoleimani, HaykZiphycare, douugdev, cocomine, huythao99 and 5 moreHaykZiphycarelucaspmv, vladakg85, ad-walker, davidnum, KianooshSoleimani and 4 moreHaykZiphycare, ehdwns980416 and AlexNovicovHaykZiphycare and AlexNovicov
Metadata
Metadata
Assignees
Labels
No labels