Skip to content

Commit f2d09e0

Browse files
committed
chore(android): remove V10 compat layer
Remove the mapbox-v11-compat/v10 directory and associated build.gradle conditionals. V10 support was already dropped in 10.3.0; this cleanup removes the remaining V10 compatibility code to simplify the codebase for V11-only support going forward. The version validation is kept to error out if someone sets RNMapboxMapsVersion to < 11.
1 parent adbed7d commit f2d09e0

File tree

23 files changed

+13
-1578
lines changed

23 files changed

+13
-1578
lines changed

android/build.gradle

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,22 @@ android {
7676
throw new GradleException(msg)
7777
}
7878
else if (safeExtGet("RNMapboxMapsImpl", defaultMapboxMapsImpl) == "mapbox") {
79-
sourceSets {
80-
main {
81-
java.srcDirs = ['src/main/java']
82-
def mapboxVersion = safeExtGet("RNMapboxMapsVersion", defaultMapboxMapsVersion)
83-
def majorMapboxVersion = mapboxVersion.split("\\.")[0] as Integer
84-
if (majorMapboxVersion >= 11) {
85-
java.srcDirs += 'src/main/mapbox-v11-compat/v11'
86-
} else {
87-
def msg = """
79+
// Validate Mapbox version is v11+
80+
def mapboxVersion = safeExtGet("RNMapboxMapsVersion", defaultMapboxMapsVersion)
81+
def majorMapboxVersion = mapboxVersion.split("\\.")[0] as Integer
82+
if (majorMapboxVersion < 11) {
83+
def msg = """
8884
❌ ERROR: Mapbox v10 is no longer supported as of @rnmapbox/maps 10.3.0
8985
Please upgrade to Mapbox v11.x or use @rnmapbox/maps 10.2.x
9086
"""
91-
logger.error(msg)
92-
throw new GradleException(msg)
93-
}
87+
logger.error(msg)
88+
throw new GradleException(msg)
89+
}
90+
91+
sourceSets {
92+
main {
93+
java.srcDirs = ['src/main/java']
94+
java.srcDirs += 'src/main/mapbox-v11-compat/v11'
9495
java.srcDirs += 'src/main/rn-compat/rn75'
9596

9697
// Adapted from react-native-screens for consistency
@@ -219,9 +220,6 @@ Please upgrade to Mapbox v11.x or use @rnmapbox/maps 10.2.x
219220
}
220221
}
221222

222-
if (safeExtGet("RNMapboxMapsUseV11", false)) {
223-
logger.warn("RNMapboxMapsUseV11 is deprecated, just set RNMapboxMapsVersion to 11.*")
224-
}
225223
}
226224
}
227225

android/src/main/mapbox-v11-compat/v10/com/mapbox/maps/extension/style/layers/generated/RasterParticleLayer.kt

Lines changed: 0 additions & 58 deletions
This file was deleted.

android/src/main/mapbox-v11-compat/v10/com/mapbox/maps/extension/style/sources/generated/RasterArraySource.kt

Lines changed: 0 additions & 20 deletions
This file was deleted.

android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/components/styles/layers/RNMBXRasterParticleLayer.kt

Lines changed: 0 additions & 22 deletions
This file was deleted.

android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/components/styles/layers/RNMBXRasterParticleLayerManager.kt

Lines changed: 0 additions & 59 deletions
This file was deleted.

android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterArraySource.kt

Lines changed: 0 additions & 16 deletions
This file was deleted.

android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterArraySourceManager.kt

Lines changed: 0 additions & 59 deletions
This file was deleted.

android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/Annotation.kt

Lines changed: 0 additions & 40 deletions
This file was deleted.

android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/Cancelable.kt

Lines changed: 0 additions & 15 deletions
This file was deleted.

android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/Event.kt

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)