@baeckerherz/expo-mapbox-navigation 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baeckerherz/expo-mapbox-navigation",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Expo module wrapping Mapbox Navigation SDK v3 for iOS and Android",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -2,5 +2,7 @@ import { ConfigPlugin } from "@expo/config-plugins";
2
2
  /**
3
3
  * Adds the authenticated Mapbox Maven repository to the Android
4
4
  * project's root build.gradle for Navigation SDK v3 downloads.
5
+ * Must be Groovy syntax (Expo's root build.gradle is Groovy, not Kotlin DSL).
6
+ * See: https://docs.mapbox.com/android/navigation/build-with-nav-sdk/installation/
5
7
  */
6
8
  export declare const withMapboxNavGradle: ConfigPlugin;
@@ -5,6 +5,8 @@ const config_plugins_1 = require("@expo/config-plugins");
5
5
  /**
6
6
  * Adds the authenticated Mapbox Maven repository to the Android
7
7
  * project's root build.gradle for Navigation SDK v3 downloads.
8
+ * Must be Groovy syntax (Expo's root build.gradle is Groovy, not Kotlin DSL).
9
+ * See: https://docs.mapbox.com/android/navigation/build-with-nav-sdk/installation/
8
10
  */
9
11
  const withMapboxNavGradle = (config) => {
10
12
  return (0, config_plugins_1.withProjectBuildGradle)(config, (config) => {
@@ -15,11 +17,11 @@ const withMapboxNavGradle = (config) => {
15
17
  maven {
16
18
  url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
17
19
  authentication {
18
- create<BasicAuthentication>("basic")
20
+ basic(BasicAuthentication)
19
21
  }
20
22
  credentials {
21
23
  username = "mapbox"
22
- password = providers.gradleProperty("MAPBOX_DOWNLOADS_TOKEN").getOrElse("")
24
+ password = project.findProperty("MAPBOX_DOWNLOADS_TOKEN") ?: System.getenv("MAPBOX_DOWNLOADS_TOKEN") ?: ""
23
25
  }
24
26
  }`;
25
27
  contents = contents.replace(/allprojects\s*\{\s*repositories\s*\{/, `allprojects {\n repositories {${mapboxMaven}`);
@@ -3,6 +3,8 @@ import { withProjectBuildGradle, ConfigPlugin } from "@expo/config-plugins";
3
3
  /**
4
4
  * Adds the authenticated Mapbox Maven repository to the Android
5
5
  * project's root build.gradle for Navigation SDK v3 downloads.
6
+ * Must be Groovy syntax (Expo's root build.gradle is Groovy, not Kotlin DSL).
7
+ * See: https://docs.mapbox.com/android/navigation/build-with-nav-sdk/installation/
6
8
  */
7
9
  export const withMapboxNavGradle: ConfigPlugin = (config) => {
8
10
  return withProjectBuildGradle(config, (config) => {
@@ -14,11 +16,11 @@ export const withMapboxNavGradle: ConfigPlugin = (config) => {
14
16
  maven {
15
17
  url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
16
18
  authentication {
17
- create<BasicAuthentication>("basic")
19
+ basic(BasicAuthentication)
18
20
  }
19
21
  credentials {
20
22
  username = "mapbox"
21
- password = providers.gradleProperty("MAPBOX_DOWNLOADS_TOKEN").getOrElse("")
23
+ password = project.findProperty("MAPBOX_DOWNLOADS_TOKEN") ?: System.getenv("MAPBOX_DOWNLOADS_TOKEN") ?: ""
22
24
  }
23
25
  }`;
24
26