@jadamsbit/react-native-mapbox-navigation 1.0.10 → 1.0.12
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 +7 -3
- 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 +12 -25
- package/android/src/main/res/layout/navigation_view.xml +6 -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/dist/index.d.ts +0 -3
- package/dist/index.js +0 -12
- package/dist/typings.d.ts +0 -38
- package/dist/typings.js +0 -1
- 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/example/android/gradlew
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#!/
|
|
1
|
+
#!/bin/sh
|
|
2
2
|
|
|
3
3
|
#
|
|
4
|
-
# Copyright 2015 the original
|
|
4
|
+
# Copyright © 2015-2021 the original authors.
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
# you may not use this file except in compliance with the License.
|
|
@@ -17,67 +17,99 @@
|
|
|
17
17
|
#
|
|
18
18
|
|
|
19
19
|
##############################################################################
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
#
|
|
21
|
+
# Gradle start up script for POSIX generated by Gradle.
|
|
22
|
+
#
|
|
23
|
+
# Important for running:
|
|
24
|
+
#
|
|
25
|
+
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
26
|
+
# noncompliant, but you have some other compliant shell such as ksh or
|
|
27
|
+
# bash, then to run this script, type that shell name before the whole
|
|
28
|
+
# command line, like:
|
|
29
|
+
#
|
|
30
|
+
# ksh Gradle
|
|
31
|
+
#
|
|
32
|
+
# Busybox and similar reduced shells will NOT work, because this script
|
|
33
|
+
# requires all of these POSIX shell features:
|
|
34
|
+
# * functions;
|
|
35
|
+
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
36
|
+
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
37
|
+
# * compound commands having a testable exit status, especially «case»;
|
|
38
|
+
# * various built-in commands including «command», «set», and «ulimit».
|
|
39
|
+
#
|
|
40
|
+
# Important for patching:
|
|
41
|
+
#
|
|
42
|
+
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
43
|
+
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
44
|
+
#
|
|
45
|
+
# The "traditional" practice of packing multiple parameters into a
|
|
46
|
+
# space-separated string is a well documented source of bugs and security
|
|
47
|
+
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
48
|
+
# options in "$@", and eventually passing that to Java.
|
|
49
|
+
#
|
|
50
|
+
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
51
|
+
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
52
|
+
# see the in-line comments for details.
|
|
53
|
+
#
|
|
54
|
+
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
55
|
+
# Darwin, MinGW, and NonStop.
|
|
56
|
+
#
|
|
57
|
+
# (3) This script is generated from the Groovy template
|
|
58
|
+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
59
|
+
# within the Gradle project.
|
|
60
|
+
#
|
|
61
|
+
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
62
|
+
#
|
|
23
63
|
##############################################################################
|
|
24
64
|
|
|
25
65
|
# Attempt to set APP_HOME
|
|
66
|
+
|
|
26
67
|
# Resolve links: $0 may be a link
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
68
|
+
app_path=$0
|
|
69
|
+
|
|
70
|
+
# Need this for daisy-chained symlinks.
|
|
71
|
+
while
|
|
72
|
+
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
|
73
|
+
[ -h "$app_path" ]
|
|
74
|
+
do
|
|
75
|
+
ls=$( ls -ld "$app_path" )
|
|
76
|
+
link=${ls#*' -> '}
|
|
77
|
+
case $link in #(
|
|
78
|
+
/*) app_path=$link ;; #(
|
|
79
|
+
*) app_path=$APP_HOME$link ;;
|
|
80
|
+
esac
|
|
37
81
|
done
|
|
38
|
-
SAVED="`pwd`"
|
|
39
|
-
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
40
|
-
APP_HOME="`pwd -P`"
|
|
41
|
-
cd "$SAVED" >/dev/null
|
|
42
82
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
#
|
|
47
|
-
|
|
83
|
+
# This is normally unused
|
|
84
|
+
# shellcheck disable=SC2034
|
|
85
|
+
APP_BASE_NAME=${0##*/}
|
|
86
|
+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
87
|
+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
|
48
88
|
|
|
49
89
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
50
|
-
MAX_FD=
|
|
90
|
+
MAX_FD=maximum
|
|
51
91
|
|
|
52
92
|
warn () {
|
|
53
93
|
echo "$*"
|
|
54
|
-
}
|
|
94
|
+
} >&2
|
|
55
95
|
|
|
56
96
|
die () {
|
|
57
97
|
echo
|
|
58
98
|
echo "$*"
|
|
59
99
|
echo
|
|
60
100
|
exit 1
|
|
61
|
-
}
|
|
101
|
+
} >&2
|
|
62
102
|
|
|
63
103
|
# OS specific support (must be 'true' or 'false').
|
|
64
104
|
cygwin=false
|
|
65
105
|
msys=false
|
|
66
106
|
darwin=false
|
|
67
107
|
nonstop=false
|
|
68
|
-
case "
|
|
69
|
-
CYGWIN* )
|
|
70
|
-
|
|
71
|
-
;;
|
|
72
|
-
|
|
73
|
-
darwin=true
|
|
74
|
-
;;
|
|
75
|
-
MINGW* )
|
|
76
|
-
msys=true
|
|
77
|
-
;;
|
|
78
|
-
NONSTOP* )
|
|
79
|
-
nonstop=true
|
|
80
|
-
;;
|
|
108
|
+
case "$( uname )" in #(
|
|
109
|
+
CYGWIN* ) cygwin=true ;; #(
|
|
110
|
+
Darwin* ) darwin=true ;; #(
|
|
111
|
+
MSYS* | MINGW* ) msys=true ;; #(
|
|
112
|
+
NONSTOP* ) nonstop=true ;;
|
|
81
113
|
esac
|
|
82
114
|
|
|
83
115
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
@@ -87,9 +119,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
|
87
119
|
if [ -n "$JAVA_HOME" ] ; then
|
|
88
120
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
89
121
|
# IBM's JDK on AIX uses strange locations for the executables
|
|
90
|
-
JAVACMD
|
|
122
|
+
JAVACMD=$JAVA_HOME/jre/sh/java
|
|
91
123
|
else
|
|
92
|
-
JAVACMD
|
|
124
|
+
JAVACMD=$JAVA_HOME/bin/java
|
|
93
125
|
fi
|
|
94
126
|
if [ ! -x "$JAVACMD" ] ; then
|
|
95
127
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
@@ -98,88 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
|
|
|
98
130
|
location of your Java installation."
|
|
99
131
|
fi
|
|
100
132
|
else
|
|
101
|
-
JAVACMD=
|
|
102
|
-
|
|
133
|
+
JAVACMD=java
|
|
134
|
+
if ! command -v java >/dev/null 2>&1
|
|
135
|
+
then
|
|
136
|
+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
103
137
|
|
|
104
138
|
Please set the JAVA_HOME variable in your environment to match the
|
|
105
139
|
location of your Java installation."
|
|
140
|
+
fi
|
|
106
141
|
fi
|
|
107
142
|
|
|
108
143
|
# Increase the maximum file descriptors if we can.
|
|
109
|
-
if
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
144
|
+
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
145
|
+
case $MAX_FD in #(
|
|
146
|
+
max*)
|
|
147
|
+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
148
|
+
# shellcheck disable=SC2039,SC3045
|
|
149
|
+
MAX_FD=$( ulimit -H -n ) ||
|
|
150
|
+
warn "Could not query maximum file descriptor limit"
|
|
151
|
+
esac
|
|
152
|
+
case $MAX_FD in #(
|
|
153
|
+
'' | soft) :;; #(
|
|
154
|
+
*)
|
|
155
|
+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
156
|
+
# shellcheck disable=SC2039,SC3045
|
|
157
|
+
ulimit -n "$MAX_FD" ||
|
|
158
|
+
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
159
|
+
esac
|
|
122
160
|
fi
|
|
123
161
|
|
|
124
|
-
#
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
162
|
+
# Collect all arguments for the java command, stacking in reverse order:
|
|
163
|
+
# * args from the command line
|
|
164
|
+
# * the main class name
|
|
165
|
+
# * -classpath
|
|
166
|
+
# * -D...appname settings
|
|
167
|
+
# * --module-path (only if needed)
|
|
168
|
+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
128
169
|
|
|
129
170
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
130
|
-
if
|
|
131
|
-
APP_HOME
|
|
132
|
-
CLASSPATH
|
|
133
|
-
|
|
134
|
-
JAVACMD
|
|
135
|
-
|
|
136
|
-
# We build the pattern for arguments to be converted via cygpath
|
|
137
|
-
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
138
|
-
SEP=""
|
|
139
|
-
for dir in $ROOTDIRSRAW ; do
|
|
140
|
-
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
141
|
-
SEP="|"
|
|
142
|
-
done
|
|
143
|
-
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
144
|
-
# Add a user-defined pattern to the cygpath arguments
|
|
145
|
-
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
146
|
-
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
147
|
-
fi
|
|
171
|
+
if "$cygwin" || "$msys" ; then
|
|
172
|
+
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
173
|
+
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
|
174
|
+
|
|
175
|
+
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
176
|
+
|
|
148
177
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
178
|
+
for arg do
|
|
179
|
+
if
|
|
180
|
+
case $arg in #(
|
|
181
|
+
-*) false ;; # don't mess with options #(
|
|
182
|
+
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
|
183
|
+
[ -e "$t" ] ;; #(
|
|
184
|
+
*) false ;;
|
|
185
|
+
esac
|
|
186
|
+
then
|
|
187
|
+
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
158
188
|
fi
|
|
159
|
-
|
|
189
|
+
# Roll the args list around exactly as many times as the number of
|
|
190
|
+
# args, so each arg winds up back in the position where it started, but
|
|
191
|
+
# possibly modified.
|
|
192
|
+
#
|
|
193
|
+
# NB: a `for` loop captures its iteration list before it begins, so
|
|
194
|
+
# changing the positional parameters here affects neither the number of
|
|
195
|
+
# iterations, nor the values presented in `arg`.
|
|
196
|
+
shift # remove old arg
|
|
197
|
+
set -- "$@" "$arg" # push replacement arg
|
|
160
198
|
done
|
|
161
|
-
case $i in
|
|
162
|
-
0) set -- ;;
|
|
163
|
-
1) set -- "$args0" ;;
|
|
164
|
-
2) set -- "$args0" "$args1" ;;
|
|
165
|
-
3) set -- "$args0" "$args1" "$args2" ;;
|
|
166
|
-
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
167
|
-
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
168
|
-
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
169
|
-
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
170
|
-
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
171
|
-
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
172
|
-
esac
|
|
173
199
|
fi
|
|
174
200
|
|
|
175
|
-
# Escape application args
|
|
176
|
-
save () {
|
|
177
|
-
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
|
178
|
-
echo " "
|
|
179
|
-
}
|
|
180
|
-
APP_ARGS=`save "$@"`
|
|
181
201
|
|
|
182
|
-
#
|
|
183
|
-
|
|
202
|
+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
203
|
+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
204
|
+
|
|
205
|
+
# Collect all arguments for the java command:
|
|
206
|
+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
207
|
+
# and any embedded shellness will be escaped.
|
|
208
|
+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
209
|
+
# treated as '${Hostname}' itself on the command line.
|
|
210
|
+
|
|
211
|
+
set -- \
|
|
212
|
+
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
213
|
+
-classpath "$CLASSPATH" \
|
|
214
|
+
org.gradle.wrapper.GradleWrapperMain \
|
|
215
|
+
"$@"
|
|
216
|
+
|
|
217
|
+
# Stop when "xargs" is not available.
|
|
218
|
+
if ! command -v xargs >/dev/null 2>&1
|
|
219
|
+
then
|
|
220
|
+
die "xargs is not available"
|
|
221
|
+
fi
|
|
222
|
+
|
|
223
|
+
# Use "xargs" to parse quoted args.
|
|
224
|
+
#
|
|
225
|
+
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
226
|
+
#
|
|
227
|
+
# In Bash we could simply go:
|
|
228
|
+
#
|
|
229
|
+
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
230
|
+
# set -- "${ARGS[@]}" "$@"
|
|
231
|
+
#
|
|
232
|
+
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
233
|
+
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
234
|
+
# character that might be a shell metacharacter, then use eval to reverse
|
|
235
|
+
# that process (while maintaining the separation between arguments), and wrap
|
|
236
|
+
# the whole thing up as a single "set" statement.
|
|
237
|
+
#
|
|
238
|
+
# This will of course break if any of these variables contains a newline or
|
|
239
|
+
# an unmatched quote.
|
|
240
|
+
#
|
|
241
|
+
|
|
242
|
+
eval "set -- $(
|
|
243
|
+
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
|
244
|
+
xargs -n1 |
|
|
245
|
+
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
|
246
|
+
tr '\n' ' '
|
|
247
|
+
)" '"$@"'
|
|
184
248
|
|
|
185
249
|
exec "$JAVACMD" "$@"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@rem limitations under the License.
|
|
15
15
|
@rem
|
|
16
16
|
|
|
17
|
-
@if "%DEBUG%"
|
|
17
|
+
@if "%DEBUG%"=="" @echo off
|
|
18
18
|
@rem ##########################################################################
|
|
19
19
|
@rem
|
|
20
20
|
@rem Gradle startup script for Windows
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
if "%OS%"=="Windows_NT" setlocal
|
|
26
26
|
|
|
27
27
|
set DIRNAME=%~dp0
|
|
28
|
-
if "%DIRNAME%"
|
|
28
|
+
if "%DIRNAME%"=="" set DIRNAME=.
|
|
29
|
+
@rem This is normally unused
|
|
29
30
|
set APP_BASE_NAME=%~n0
|
|
30
31
|
set APP_HOME=%DIRNAME%
|
|
31
32
|
|
|
@@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|
|
40
41
|
|
|
41
42
|
set JAVA_EXE=java.exe
|
|
42
43
|
%JAVA_EXE% -version >NUL 2>&1
|
|
43
|
-
if
|
|
44
|
+
if %ERRORLEVEL% equ 0 goto execute
|
|
44
45
|
|
|
45
|
-
echo.
|
|
46
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
47
|
-
echo.
|
|
48
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
49
|
-
echo location of your Java installation.
|
|
46
|
+
echo. 1>&2
|
|
47
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
48
|
+
echo. 1>&2
|
|
49
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
50
|
+
echo location of your Java installation. 1>&2
|
|
50
51
|
|
|
51
52
|
goto fail
|
|
52
53
|
|
|
@@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
|
56
57
|
|
|
57
58
|
if exist "%JAVA_EXE%" goto execute
|
|
58
59
|
|
|
59
|
-
echo.
|
|
60
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
61
|
-
echo.
|
|
62
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
63
|
-
echo location of your Java installation.
|
|
60
|
+
echo. 1>&2
|
|
61
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
62
|
+
echo. 1>&2
|
|
63
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
64
|
+
echo location of your Java installation. 1>&2
|
|
64
65
|
|
|
65
66
|
goto fail
|
|
66
67
|
|
|
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
|
75
76
|
|
|
76
77
|
:end
|
|
77
78
|
@rem End local scope for the variables with windows NT shell
|
|
78
|
-
if
|
|
79
|
+
if %ERRORLEVEL% equ 0 goto mainEnd
|
|
79
80
|
|
|
80
81
|
:fail
|
|
81
82
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
82
83
|
rem the _cmd.exe /c_ return code!
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
set EXIT_CODE=%ERRORLEVEL%
|
|
85
|
+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
|
86
|
+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
|
87
|
+
exit /b %EXIT_CODE%
|
|
85
88
|
|
|
86
89
|
:mainEnd
|
|
87
90
|
if "%OS%"=="Windows_NT" endlocal
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
rootProject.name = '
|
|
1
|
+
rootProject.name = 'MapboxNavigationExample'
|
|
2
2
|
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
|
3
3
|
include ':app'
|
|
4
|
-
|
|
4
|
+
includeBuild('../node_modules/@react-native/gradle-plugin')
|
|
5
5
|
include ':mapboxnavigation'
|
|
6
|
-
project(':mapboxnavigation').projectDir = new File(rootProject.projectDir, '../../android')
|
|
6
|
+
project(':mapboxnavigation').projectDir = new File(rootProject.projectDir, '../../android')
|
package/example/app.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"displayName": "
|
|
4
|
-
}
|
|
2
|
+
"name": "MapboxNavigationExample",
|
|
3
|
+
"displayName": "MapboxNavigationExample"
|
|
4
|
+
}
|
package/example/babel.config.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Metro configuration for React Native
|
|
3
|
-
* https://github.com/facebook/react-native
|
|
4
|
-
*
|
|
5
|
-
* @format
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
1
|
const path = require('path');
|
|
9
2
|
const pak = require('../package.json');
|
|
10
3
|
|
|
11
4
|
module.exports = {
|
|
12
|
-
presets: ['module
|
|
5
|
+
presets: ['module:@react-native/babel-preset'],
|
|
13
6
|
plugins: [
|
|
14
7
|
[
|
|
15
8
|
'module-resolver',
|
package/example/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {AppRegistry} from 'react-native';
|
|
6
|
-
import App from './App';
|
|
7
|
-
import {name as appName} from './app.json';
|
|
1
|
+
import { AppRegistry } from 'react-native';
|
|
2
|
+
import App from './src/App';
|
|
3
|
+
import { name as appName } from './app.json';
|
|
8
4
|
|
|
9
5
|
AppRegistry.registerComponent(appName, () => App);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export NODE_BINARY=$(command -v node)
|
|
@@ -53,7 +53,7 @@ static void InitializeFlipper(UIApplication *application) {
|
|
|
53
53
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
54
54
|
{
|
|
55
55
|
#if DEBUG
|
|
56
|
-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"
|
|
56
|
+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
|
57
57
|
#else
|
|
58
58
|
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
59
59
|
#endif
|
|
@@ -17,33 +17,22 @@
|
|
|
17
17
|
<key>CFBundlePackageType</key>
|
|
18
18
|
<string>APPL</string>
|
|
19
19
|
<key>CFBundleShortVersionString</key>
|
|
20
|
-
<string
|
|
20
|
+
<string>$(MARKETING_VERSION)</string>
|
|
21
21
|
<key>CFBundleSignature</key>
|
|
22
22
|
<string>????</string>
|
|
23
23
|
<key>CFBundleVersion</key>
|
|
24
|
-
<string
|
|
24
|
+
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
25
25
|
<key>LSRequiresIPhoneOS</key>
|
|
26
26
|
<true/>
|
|
27
27
|
<key>NSAppTransportSecurity</key>
|
|
28
28
|
<dict>
|
|
29
|
-
<key>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
|
34
|
-
<true/>
|
|
35
|
-
</dict>
|
|
36
|
-
</dict>
|
|
29
|
+
<key>NSAllowsArbitraryLoads</key>
|
|
30
|
+
<false/>
|
|
31
|
+
<key>NSAllowsLocalNetworking</key>
|
|
32
|
+
<true/>
|
|
37
33
|
</dict>
|
|
38
34
|
<key>NSLocationWhenInUseUsageDescription</key>
|
|
39
|
-
<string
|
|
40
|
-
<key>UIBackgroundModes</key>
|
|
41
|
-
<array>
|
|
42
|
-
<string>audio</string>
|
|
43
|
-
<string>fetch</string>
|
|
44
|
-
<string>location</string>
|
|
45
|
-
<string>processing</string>
|
|
46
|
-
</array>
|
|
35
|
+
<string>Show current location on the route maps.</string>
|
|
47
36
|
<key>UILaunchStoryboardName</key>
|
|
48
37
|
<string>LaunchScreen</string>
|
|
49
38
|
<key>UIRequiredDeviceCapabilities</key>
|
|
@@ -53,10 +42,21 @@
|
|
|
53
42
|
<key>UISupportedInterfaceOrientations</key>
|
|
54
43
|
<array>
|
|
55
44
|
<string>UIInterfaceOrientationPortrait</string>
|
|
45
|
+
</array>
|
|
46
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
47
|
+
<array>
|
|
56
48
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
57
49
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
50
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
58
51
|
</array>
|
|
59
52
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
60
53
|
<false/>
|
|
54
|
+
<key>UIBackgroundModes</key>
|
|
55
|
+
<array>
|
|
56
|
+
<string>audio</string>
|
|
57
|
+
<string>location</string>
|
|
58
|
+
</array>
|
|
59
|
+
<key>MGLMapboxAccessToken</key>
|
|
60
|
+
<string>pk.eyJ1IjoiYWRhbXNqYW1pZSIsImEiOiJja211enlwMXUwMGNjMm5xbjB2bjZrazBkIn0.U4IzgCKh43lsGEoeOSMT4g</string>
|
|
61
61
|
</dict>
|
|
62
62
|
</plist>
|