Skip to content

Commit fef824a

Browse files
authored
Fix GL-Native snapshots not resolving; refactor verify-docs job (#2878)
* Fix GL-Native snapshots not resolving * PR fixes * Fix doc validation because of common not being part of gl-native
1 parent 7d89871 commit fef824a

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens
482482

483483
===========================================================================
484484

485-
### MapboxCoreMaps,11.9.0-beta.1,Mapbox ToS,Mapbox,https://www.mapbox.com/
485+
### MapboxCoreMaps,11.10.0-beta.1,Mapbox ToS,Mapbox,https://www.mapbox.com/
486486

487487
```
488488
Mapbox Core Maps version 11.0

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ japicmp = "0.4.1"
3535
# Dependencies
3636

3737
# GlNative and Common are used by the convention plugin
38-
mapboxGlNative = "11.9.0-beta.1"
39-
mapboxCommon = "24.9.0-beta.1"
38+
mapboxGlNative = "11.10.0-SNAPSHOT-12-03--10-49.git-b51ed89"
39+
mapboxCommon = "24.10.0-SNAPSHOT-12-03--10-49.git-b51ed89"
4040

4141
mapboxBase = "0.11.0"
4242
mapboxGestures = "0.8.0"

mapbox-convention-plugin/src/main/kotlin/com/mapbox/maps/gradle/plugins/internal/Dependencies.kt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,23 @@ import org.gradle.api.Project
55
/**
66
* @param group The dependency group ID
77
* @param artifact The dependency artifact ID
8-
* @param snapshotArtifact The dependency artifact ID to use if the version contains `-SNAPSHOT`
98
* @param supportsNdkVariant True if this dependency also publishes variants for different NDKs.
109
* The NDK will be suffixed to the artifact ID.
1110
*/
1211
internal abstract class BaseDependency(
1312
open val group: String,
1413
open val artifact: String,
15-
open val snapshotArtifact: String = artifact,
1614
open val supportsNdkVariant: Boolean = false,
1715
) {
1816
abstract fun resolveVersion(project: Project): String
1917

2018
fun add(project: Project, configuration: String) {
2119
val version = resolveVersion(project)
22-
var artifactId = if (version.contains("-SNAPSHOT")) {
23-
snapshotArtifact
20+
val artifactId = if (supportsNdkVariant) {
21+
project.appendNdkIfNeeded(artifact)
2422
} else {
2523
artifact
2624
}
27-
if (supportsNdkVariant) {
28-
artifactId = project.appendNdkIfNeeded(artifactId)
29-
}
3025
val coordinates = "${group}:$artifactId:$version"
3126
project.dependencies.add(configuration, coordinates)
3227
}
@@ -36,9 +31,8 @@ internal data class Dependency(
3631
override val group: String,
3732
override val artifact: String,
3833
private val version: String,
39-
override val snapshotArtifact: String = artifact,
4034
override val supportsNdkVariant: Boolean = false,
41-
) : BaseDependency(group, artifact, snapshotArtifact, supportsNdkVariant) {
35+
) : BaseDependency(group, artifact, supportsNdkVariant) {
4236
override fun resolveVersion(project: Project): String = version
4337
}
4438

@@ -51,9 +45,8 @@ internal data class VersionCatalogDependency(
5145
override val artifact: String,
5246
private val versionRef: String,
5347
private val catalogName: String = "libs",
54-
override val snapshotArtifact: String = artifact,
5548
override val supportsNdkVariant: Boolean = false,
56-
) : BaseDependency(group, artifact, snapshotArtifact, supportsNdkVariant) {
49+
) : BaseDependency(group, artifact, supportsNdkVariant) {
5750

5851
override fun resolveVersion(project: Project): String =
5952
project.getVersionCatalog(catalogName).findVersion(versionRef).get().toString()

mapbox-convention-plugin/src/main/kotlin/com/mapbox/maps/gradle/plugins/internal/MapboxDependencies.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ internal object MapboxDependencies {
1010

1111
internal val GlNative = VersionCatalogDependency(
1212
group = "com.mapbox.maps",
13+
// v11.9 snapshots or earlier should use `android-core-internal` as `artifact`.
1314
artifact = "android-core",
1415
versionRef = "mapboxGlNative",
15-
snapshotArtifact = "android-core-internal",
1616
supportsNdkVariant = true
1717
)
1818
}

0 commit comments

Comments
 (0)