Skip to content

Commit

Permalink
v3.4.0-rc.1 (#7875)
Browse files Browse the repository at this point in the history
1e60d37b42af63f85dececfcb477653dcfaf2d14
  • Loading branch information
RingerJK authored Oct 2, 2024
1 parent 7657c00 commit 7850eb0
Show file tree
Hide file tree
Showing 29 changed files with 739 additions and 2,977 deletions.
1,182 changes: 0 additions & 1,182 deletions .circleci/config.yml

This file was deleted.

21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog for the Mapbox Navigation SDK Core Framework for Android

## Navigation SDK Core Framework 3.4.0-rc.1 - 17 September, 2024
#### Features


#### Bug fixes and improvements
- Fixed `CarSearchLocationProvider` produces _NullPointerException_ when using Mapbox Search SDK. [#6702](https://github.com/mapbox/mapbox-navigation-android/pull/6702)

#### Known issues :warning:


#### Other changes


### Mapbox dependencies
This release depends on, and has been tested with, the following Mapbox dependencies:
- Mapbox Maps SDK `v11.7.0-rc.1` ([release notes](https://github.com/mapbox/mapbox-maps-android/releases/tag/v11.7.0-rc.1))
- Mapbox Navigation Native `v319.0.0`
- Mapbox Core Common `v24.7.0-rc.2`
- Mapbox Java `v7.2.0` ([release notes](https://github.com/mapbox/mapbox-java/releases/tag/v7.2.0))


## Navigation SDK Core Framework 3.4.0-beta.1 - 05 September, 2024
#### Features
- Signature of experimental `EtcGateApi#updateEtcGateInfo` function has been changed, now it accepts `EtcGateApi.EtcGateInfo` as a function parameter. [#6508](https://github.com/mapbox/mapbox-navigation-android/pull/6508)
Expand Down
1 change: 0 additions & 1 deletion CODEOWNERS

This file was deleted.

1,869 changes: 313 additions & 1,556 deletions LICENSE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CarSearchLocationProvider : LocationProvider, MapboxNavigationObserver {
}
private set

private val observers = ConcurrentHashMap<CommonLocationObserver, Looper?>()
private val observers = ConcurrentHashMap<CommonLocationObserver, () -> Looper?>()

private val locationObserver = object : LocationObserver {
override fun onNewRawLocation(rawLocation: Location) {
Expand All @@ -38,7 +38,7 @@ class CarSearchLocationProvider : LocationProvider, MapboxNavigationObserver {
override fun onNewLocationMatcherResult(locationMatcherResult: LocationMatcherResult) {
location = locationMatcherResult
observers.forEach { (callback, looper) ->
notifyCallback(locationMatcherResult, callback, looper)
notifyCallback(locationMatcherResult, callback, looper())
}
}
}
Expand All @@ -60,14 +60,14 @@ class CarSearchLocationProvider : LocationProvider, MapboxNavigationObserver {
}

override fun addLocationObserver(observer: CommonLocationObserver) {
observers[observer] = null
observers[observer] = { null }
}

override fun addLocationObserver(
observer: com.mapbox.common.location.LocationObserver,
looper: Looper,
) {
observers[observer] = looper
observers[observer] = { looper }
}

override fun removeLocationObserver(observer: com.mapbox.common.location.LocationObserver) {
Expand Down
20 changes: 1 addition & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ buildscript {
}
}

apply plugin: 'jacoco'
apply plugin: 'org.jetbrains.dokka'

task testReport(type: TestReport, group: 'Build') {
Expand Down Expand Up @@ -86,6 +85,7 @@ subprojects {
apply from: "${rootDir}/gradle/dependency-updates.gradle"
apply from: "${rootDir}/gradle/checkstyle.gradle"
apply from: "${rootDir}/gradle/dependencies-graph.gradle"
apply from: "${rootDir}/gradle/save-sdk-version.gradle"

plugins.withId('org.jetbrains.kotlin.jvm') {
compileKotlin {
Expand All @@ -96,24 +96,6 @@ subprojects {
}
}

// Need for building Dash app from Nav SDK sources
// Fix https://mapbox.atlassian.net/browse/NA-2065
import org.gradle.util.VersionNumber
if (VersionNumber.parse(project.getGradle().getGradleVersion()) >= VersionNumber.parse("8.0.0")) {
afterEvaluate {
subprojects {
tasks.configureEach {
if (name == "packageDebugAssets" || name == "packageReleaseAssets" || name == "mergeDebugAssets") {
def task = tasks.findByName("saveSDKVersion")
if (task != null) {
dependsOn task
}
}
}
}
}
}

apply from: "${rootDir}/gradle/kdoc-settings.gradle"

dokkaHtmlMultiModule {
Expand Down
12 changes: 6 additions & 6 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ ext {
// version which we should use in this build
def mapboxNavigatorVersion = System.getenv("FORCE_MAPBOX_NAVIGATION_NATIVE_VERSION")
if (mapboxNavigatorVersion == null || mapboxNavigatorVersion == '') {
mapboxNavigatorVersion = '318.0.0'
mapboxNavigatorVersion = '319.0.0'
}
println("Navigation Native version: " + mapboxNavigatorVersion)

version = [
mapboxMapSdk : '11.7.0-beta.1',
mapboxMapSdk : '11.7.0-rc.1',
mapboxSdkServices : '7.2.0',
mapboxNavigator : "${mapboxNavigatorVersion}",
mapboxCommonNative : '24.7.0-beta.2',
mapboxSearch : '2.5.0-beta.1',
mapboxCommonNative : '24.7.0-rc.2',
mapboxSearch : '2.5.0-rc.2',
mapboxBaseAndroid : '0.11.0',
androidXLifecycle : '2.4.0',
androidXCoreVersion : '1.6.0',
Expand Down Expand Up @@ -198,7 +198,7 @@ ext {
// because the version used by license has been removed from the repository.
// This dependency may be removed when we bump license version.
kotlinHtmlJvm : '0.7.2',
jacoco : '0.2',
jacoco : '0.8.12',
googleServices : '4.3.3',
mapboxSdkVersions : '1.1.3',
dokka : '1.6.21',
Expand All @@ -219,7 +219,7 @@ ext {
kotlinHtmlJvm : "org.jetbrains.kotlinx:kotlinx-html-jvm:${pluginVersion.kotlinHtmlJvm}",
dependencyGraph : "com.vanniktech:gradle-dependency-graph-generator-plugin:${pluginVersion.dependencyGraph}",
dependencyUpdates : "com.github.ben-manes:gradle-versions-plugin:${pluginVersion.dependencyUpdates}",
jacoco : "com.hiya:jacoco-android:${pluginVersion.jacoco}",
jacoco : "org.jacoco:org.jacoco.core:${pluginVersion.jacoco}",
googleServices : "com.google.gms:google-services:${pluginVersion.googleServices}",
mapboxSdkVersions : "com.mapbox.mapboxsdk:mapbox-android-sdk-versions:${pluginVersion.mapboxSdkVersions}",
dokka : "org.jetbrains.dokka:dokka-gradle-plugin:${pluginVersion.dokka}",
Expand Down
100 changes: 87 additions & 13 deletions gradle/jacoco.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,92 @@
// Need for the build form the Dash app with Gradle 8.1
if (VersionNumber.parse(project.getGradle().getGradleVersion()) < VersionNumber.parse("8.0")) {
apply plugin: 'com.hiya.jacoco-android'
apply plugin: 'jacoco'

jacoco {
toolVersion = "0.8.7"
}

tasks.withType(Test) {
jacoco {
toolVersion = "0.8.12"
}

// needed to capture coverage from Robolectric tests
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true

// required to run on Java 9+
// refs https://github.com/gradle/gradle/issues/5184#issuecomment-457865951
jacoco.excludes = ['jdk.internal.*']
}
}

static def excludes() {
return [
// Android
'**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
// Android data binding
'android/databinding/**/*.class',
'**/android/databinding/*Binding.class',
'**/BR.*'
]
}

def findOrCreateJacocoTestReportTask() {
Task jacocoTestReportTask = project.tasks.findByName("jacocoTestReport")
if (!jacocoTestReportTask) {
jacocoTestReportTask = project.tasks.create("jacocoTestReport") {
group = "reporting"
}
}
return jacocoTestReportTask
}

def createReportTask(variant) {
def sourceDirs = variant.sourceSets.java.srcDirs.collect { it.path }.flatten()
def classesDir = variant.hasProperty('javaCompileProvider')
? variant.javaCompileProvider.get().destinationDir
: variant.javaCompile.destinationDir
def testTask = project.tasks.named("test${variant.name.capitalize()}UnitTest").get()
def kotlin = project.plugins.findPlugin('kotlin-android')

def reportTask = project.tasks.register("jacoco${testTask.name.capitalize()}Report", JacocoReport) {
dependsOn(testTask)

group = "reporting"
description = "Generates Jacoco coverage reports for the ${variant.name} variant."
executionData.setFrom(project.files(testTask.jacoco.destinationFile.path))
sourceDirectories.setFrom(project.files(sourceDirs))

FileTree javaTree = project.fileTree(dir: classesDir, excludes: excludes())

if (kotlin) {
def kotlinClassesDir = project.layout.buildDirectory.dir("tmp/kotlin-classes/${variant.name}").get().asFile.path
def kotlinTree = project.fileTree(dir: kotlinClassesDir, excludes: excludes())
classDirectories.setFrom(javaTree + kotlinTree)
} else {
classDirectories.setFrom(javaTree)
}

reports {
xml.required = true
csv.required = false
html.required = true

xml.outputLocation.set(project.layout.buildDirectory.file("jacoco/jacoco.xml").get())
csv.outputLocation.set(project.layout.buildDirectory.file("jacoco/jacoco.csv").get())
html.outputLocation.set(project.layout.buildDirectory.dir("jacoco/jacocoHtml").get())
}
}

return reportTask
}

private void logTaskAdded(JacocoReport reportTask) {
logger.info("Added $reportTask")
logger.info(" executionData: $reportTask.executionData.asPath")
logger.info(" sourceDirectories: $reportTask.sourceDirectories.asPath")
logger.info(" csv.outputLocation: ${reportTask.reports.csv.outputLocation.get()}")
logger.info(" xml.outputLocation: ${reportTask.reports.xml.outputLocation.get()}")
logger.info(" html.outputLocation: ${reportTask.reports.html.outputLocation.get()}")
}

project.android.libraryVariants.all { variant ->
def jacocoTestReportTask = findOrCreateJacocoTestReportTask()

def reportTask = createReportTask(variant)
jacocoTestReportTask.dependsOn(reportTask)

logTaskAdded(reportTask.get())
}
9 changes: 9 additions & 0 deletions gradle/save-sdk-version.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tasks.configureEach {
if (name == "packageDebugAssets" || name == "packageReleaseAssets"
|| name == "mergeDebugAssets" || name == "mergeReleaseAssets") {
def task = tasks.findByName("saveSDKVersion")
if (task != null) {
dependsOn task
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 4 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Sep 01 12:16:51 MSK 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 7850eb0

Please sign in to comment.