File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,11 @@ android {
66
66
targetCompatibility JavaVersion . VERSION_1_8
67
67
}
68
68
kotlinOptions {
69
- jvmTarget = JavaVersion . VERSION_17
69
+ if (reactNativeMinorVersion() >= 73 ) {
70
+ jvmTarget = JavaVersion . VERSION_17
71
+ } else {
72
+ jvmTarget = JavaVersion . VERSION_11
73
+ }
70
74
}
71
75
72
76
flavorDimensions " RNN.reactNativeVersion"
@@ -110,6 +114,9 @@ android {
110
114
reactNative71 {
111
115
dimension " RNN.reactNativeVersion"
112
116
buildConfigField(" int" , " REACT_NATVE_VERSION_MINOR" , " 71" )
117
+ kotlinOptions {
118
+ jvmTarget = JavaVersion . VERSION_17
119
+ }
113
120
}
114
121
}
115
122
@@ -122,6 +129,11 @@ android {
122
129
}
123
130
}
124
131
132
+ int reactNativeMinorVersion () {
133
+ List reactNativeVersionComponents = reactNativeVersionComponents(findReactNativePackageJson())
134
+ reactNativeVersionComponents[1 ]. toInteger()
135
+ }
136
+
125
137
String resolveFlavor () {
126
138
List reactNativeVersionComponents = reactNativeVersionComponents(findReactNativePackageJson())
127
139
Integer reactNativeMinorComponent = reactNativeVersionComponents[1 ]. toInteger()
You can’t perform that action at this time.
0 commit comments