@jadamsbit/react-native-mapbox-navigation 1.0.11 → 1.0.13
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/.gitattributes +2 -0
- package/.github/actions/setup/action.yml +27 -0
- package/.github/workflows/ci.yml +154 -0
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
- package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +28 -0
- package/.yarn/releases/yarn-3.6.1.cjs +874 -0
- package/CONTRIBUTING.md +117 -6
- package/LICENSE +1 -2
- package/README.md +4 -4
- package/android/build.gradle +9 -5
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +2 -2
- package/android/gradle.properties +5 -3
- package/android/gradlew +17 -12
- package/android/gradlew.bat +10 -10
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/jadamsbit/mapboxnavigation/{MapboxNavigationManager.kt → MapboxNavigationModule.kt} +30 -27
- package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationPackage.kt +3 -2
- package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationView.kt +11 -24
- package/android/src/main/res/layout/navigation_view.xml +6 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -7
- package/example/.buckconfig +0 -0
- package/example/{_bundle → .bundle}/config +0 -0
- package/example/.eslintrc.js +1 -1
- package/example/.flowconfig +0 -0
- package/example/.prettierrc.js +2 -2
- package/example/.watchmanconfig +1 -1
- package/example/Gemfile +5 -2
- package/example/NavigationComponent.js +0 -1
- package/example/README.md +79 -0
- package/example/android/app/build.gradle +60 -173
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -0
- package/example/android/app/src/debug/AndroidManifest.xml +1 -5
- package/example/android/app/src/main/AndroidManifest.xml +5 -9
- package/example/android/app/src/main/java/com/mapboxnavigationexample/MainActivity.kt +22 -0
- package/example/android/app/src/main/java/com/mapboxnavigationexample/MainApplication.kt +45 -0
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +1 -1
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +1 -1
- package/example/android/app/src/main/res/values/styles.xml +0 -0
- package/example/android/build.gradle +19 -35
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +3 -1
- package/example/android/gradle.properties +18 -7
- package/example/android/gradlew +173 -109
- package/example/android/gradlew.bat +19 -16
- package/example/android/settings.gradle +3 -3
- package/example/app.json +3 -3
- package/example/babel.config.js +1 -8
- package/example/index.js +3 -7
- package/example/ios/.xcode.env +1 -0
- package/example/ios/.xcode.env.local +2 -0
- package/example/ios/BasicApp/AppDelegate.h +1 -1
- package/example/ios/BasicApp/AppDelegate.m +1 -1
- package/example/ios/BasicApp/Info.plist +18 -18
- package/example/ios/BasicApp.xcodeproj/project.pbxproj +35 -9
- package/example/ios/BasicApp.xcodeproj/xcshareddata/xcschemes/BasicApp.xcscheme +1 -1
- package/example/ios/Podfile +48 -25
- package/example/ios/Podfile.lock +1257 -299
- package/example/jest.config.js +3 -0
- package/example/metro.config.js +19 -19
- package/example/package.json +14 -17
- package/example/react-native.config.js +10 -0
- package/example/{App.js → src/App.js} +3 -3
- package/package.json +1 -1
- package/src/__tests__/index.test.tsx +1 -0
- package/src/typings.ts +0 -1
- package/.vscode/settings.json +0 -3
- package/android/.gradle/7.3.3/checksums/checksums.lock +0 -0
- package/android/.gradle/7.3.3/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.3.3/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.3.3/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.3.3/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.3.3/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.3.3/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.3.3/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.3.3/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/README.md +0 -14
- package/example/Gemfile.lock +0 -100
- package/example/__tests__/App-test.js +0 -14
- package/example/_ruby-version +0 -1
- package/example/android/.gradle/8.2/checksums/checksums.lock +0 -0
- package/example/android/.gradle/8.2/fileChanges/last-build.bin +0 -0
- package/example/android/.gradle/8.2/fileHashes/fileHashes.lock +0 -0
- package/example/android/.gradle/8.2/gc.properties +0 -0
- package/example/android/.gradle/vcs-1/gc.properties +0 -0
- package/example/android/app/_BUCK +0 -55
- package/example/android/app/build_defs.bzl +0 -19
- package/example/android/app/src/debug/java/com/basicapp/ReactNativeFlipper.java +0 -72
- package/example/android/app/src/main/java/com/basicapp/MainActivity.java +0 -15
- package/example/android/app/src/main/java/com/basicapp/MainApplication.java +0 -81
- package/img/bridging-header.png +0 -0
- package/img/build-setting-linking.png +0 -0
- package/img/build-setting-path.png +0 -0
- /package/android/src/main/res/{values → value}/styles.xml +0 -0
package/.gitattributes
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Setup
|
|
2
|
+
description: Setup Node.js and install dependencies
|
|
3
|
+
|
|
4
|
+
runs:
|
|
5
|
+
using: composite
|
|
6
|
+
steps:
|
|
7
|
+
- name: Setup Node.js
|
|
8
|
+
uses: actions/setup-node@v3
|
|
9
|
+
with:
|
|
10
|
+
node-version-file: .nvmrc
|
|
11
|
+
|
|
12
|
+
- name: Cache dependencies
|
|
13
|
+
id: yarn-cache
|
|
14
|
+
uses: actions/cache@v3
|
|
15
|
+
with:
|
|
16
|
+
path: |
|
|
17
|
+
**/node_modules
|
|
18
|
+
.yarn/install-state.gz
|
|
19
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
|
|
20
|
+
restore-keys: |
|
|
21
|
+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
|
22
|
+
${{ runner.os }}-yarn-
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
26
|
+
run: yarn install --immutable
|
|
27
|
+
shell: bash
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
pull_request:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
lint:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
|
|
17
|
+
- name: Setup
|
|
18
|
+
uses: ./.github/actions/setup
|
|
19
|
+
|
|
20
|
+
- name: Lint files
|
|
21
|
+
run: yarn lint
|
|
22
|
+
|
|
23
|
+
- name: Typecheck files
|
|
24
|
+
run: yarn typecheck
|
|
25
|
+
|
|
26
|
+
test:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout
|
|
30
|
+
uses: actions/checkout@v3
|
|
31
|
+
|
|
32
|
+
- name: Setup
|
|
33
|
+
uses: ./.github/actions/setup
|
|
34
|
+
|
|
35
|
+
- name: Run unit tests
|
|
36
|
+
run: yarn test --maxWorkers=2 --coverage
|
|
37
|
+
|
|
38
|
+
build-library:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
steps:
|
|
41
|
+
- name: Checkout
|
|
42
|
+
uses: actions/checkout@v3
|
|
43
|
+
|
|
44
|
+
- name: Setup
|
|
45
|
+
uses: ./.github/actions/setup
|
|
46
|
+
|
|
47
|
+
- name: Build package
|
|
48
|
+
run: yarn prepare
|
|
49
|
+
|
|
50
|
+
build-android:
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
env:
|
|
53
|
+
TURBO_CACHE_DIR: .turbo/android
|
|
54
|
+
steps:
|
|
55
|
+
- name: Checkout
|
|
56
|
+
uses: actions/checkout@v3
|
|
57
|
+
|
|
58
|
+
- name: Setup
|
|
59
|
+
uses: ./.github/actions/setup
|
|
60
|
+
|
|
61
|
+
- name: Cache turborepo for Android
|
|
62
|
+
uses: actions/cache@v3
|
|
63
|
+
with:
|
|
64
|
+
path: ${{ env.TURBO_CACHE_DIR }}
|
|
65
|
+
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
|
|
66
|
+
restore-keys: |
|
|
67
|
+
${{ runner.os }}-turborepo-android-
|
|
68
|
+
|
|
69
|
+
- name: Check turborepo cache for Android
|
|
70
|
+
run: |
|
|
71
|
+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
|
|
72
|
+
|
|
73
|
+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
|
|
74
|
+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
- name: Install JDK
|
|
78
|
+
if: env.turbo_cache_hit != 1
|
|
79
|
+
uses: actions/setup-java@v3
|
|
80
|
+
with:
|
|
81
|
+
distribution: 'zulu'
|
|
82
|
+
java-version: '17'
|
|
83
|
+
|
|
84
|
+
- name: Finalize Android SDK
|
|
85
|
+
if: env.turbo_cache_hit != 1
|
|
86
|
+
run: |
|
|
87
|
+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
|
|
88
|
+
|
|
89
|
+
- name: Cache Gradle
|
|
90
|
+
if: env.turbo_cache_hit != 1
|
|
91
|
+
uses: actions/cache@v3
|
|
92
|
+
with:
|
|
93
|
+
path: |
|
|
94
|
+
~/.gradle/wrapper
|
|
95
|
+
~/.gradle/caches
|
|
96
|
+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
|
|
97
|
+
restore-keys: |
|
|
98
|
+
${{ runner.os }}-gradle-
|
|
99
|
+
|
|
100
|
+
- name: Build example for Android
|
|
101
|
+
env:
|
|
102
|
+
JAVA_OPTS: "-XX:MaxHeapSize=6g"
|
|
103
|
+
run: |
|
|
104
|
+
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
|
|
105
|
+
|
|
106
|
+
build-ios:
|
|
107
|
+
runs-on: macos-14
|
|
108
|
+
env:
|
|
109
|
+
TURBO_CACHE_DIR: .turbo/ios
|
|
110
|
+
steps:
|
|
111
|
+
- name: Checkout
|
|
112
|
+
uses: actions/checkout@v3
|
|
113
|
+
|
|
114
|
+
- name: Setup
|
|
115
|
+
uses: ./.github/actions/setup
|
|
116
|
+
|
|
117
|
+
- name: Cache turborepo for iOS
|
|
118
|
+
uses: actions/cache@v3
|
|
119
|
+
with:
|
|
120
|
+
path: ${{ env.TURBO_CACHE_DIR }}
|
|
121
|
+
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
|
|
122
|
+
restore-keys: |
|
|
123
|
+
${{ runner.os }}-turborepo-ios-
|
|
124
|
+
|
|
125
|
+
- name: Check turborepo cache for iOS
|
|
126
|
+
run: |
|
|
127
|
+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
|
|
128
|
+
|
|
129
|
+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
|
|
130
|
+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
- name: Cache cocoapods
|
|
134
|
+
if: env.turbo_cache_hit != 1
|
|
135
|
+
id: cocoapods-cache
|
|
136
|
+
uses: actions/cache@v3
|
|
137
|
+
with:
|
|
138
|
+
path: |
|
|
139
|
+
**/ios/Pods
|
|
140
|
+
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
|
|
141
|
+
restore-keys: |
|
|
142
|
+
${{ runner.os }}-cocoapods-
|
|
143
|
+
|
|
144
|
+
- name: Install cocoapods
|
|
145
|
+
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
|
|
146
|
+
run: |
|
|
147
|
+
cd example/ios
|
|
148
|
+
pod install
|
|
149
|
+
env:
|
|
150
|
+
NO_FLIPPER: 1
|
|
151
|
+
|
|
152
|
+
- name: Build example for iOS
|
|
153
|
+
run: |
|
|
154
|
+
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
|