@maplibre/maplibre-react-native 10.0.1 → 10.1.0-beta.1
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/android/build.gradle +11 -5
- package/android/gradle.properties +1 -0
- package/lib/commonjs/plugin/android.js +6 -4
- package/lib/commonjs/plugin/android.js.map +1 -1
- package/lib/module/plugin/android.js +5 -3
- package/lib/module/plugin/android.js.map +1 -1
- package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts +7 -1
- package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/plugin/android.d.ts +0 -1
- package/lib/typescript/commonjs/src/plugin/android.d.ts.map +1 -1
- package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts +7 -1
- package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts.map +1 -1
- package/lib/typescript/module/src/plugin/android.d.ts +0 -1
- package/lib/typescript/module/src/plugin/android.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/plugin/MapLibrePluginProps.ts +7 -1
- package/src/plugin/android.ts +3 -7
package/android/build.gradle
CHANGED
|
@@ -36,7 +36,7 @@ def getExtOrDefault(name) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
def getConfigurableExtOrDefault(name) {
|
|
39
|
-
|
|
39
|
+
return rootProject.ext.has("org.maplibre.reactnative." + name) ? rootProject.ext.get("org.maplibre.reactnative." + name) : project.properties["org.maplibre.reactnative." + name]
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
def getExtOrIntegerDefault(name) {
|
|
@@ -117,12 +117,18 @@ dependencies {
|
|
|
117
117
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
118
118
|
|
|
119
119
|
// MapLibre Native
|
|
120
|
-
implementation "org.maplibre.gl:android-sdk:${getConfigurableExtOrDefault('nativeVersion')}"
|
|
120
|
+
implementation "org.maplibre.gl:android-sdk-${getConfigurableExtOrDefault('nativeVariant')}:${getConfigurableExtOrDefault('nativeVersion')}"
|
|
121
121
|
|
|
122
122
|
// MapLibre Plugins
|
|
123
|
-
implementation
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
implementation("org.maplibre.gl:android-plugin-localization-v9:${getConfigurableExtOrDefault('pluginVersion')}") {
|
|
124
|
+
exclude(group: "org.maplibre.gl", module: "android-sdk")
|
|
125
|
+
}
|
|
126
|
+
implementation("org.maplibre.gl:android-plugin-annotation-v9:${getConfigurableExtOrDefault('pluginVersion')}") {
|
|
127
|
+
exclude(group: "org.maplibre.gl", module: "android-sdk")
|
|
128
|
+
}
|
|
129
|
+
implementation("org.maplibre.gl:android-plugin-markerview-v9:${getConfigurableExtOrDefault('pluginVersion')}") {
|
|
130
|
+
exclude(group: "org.maplibre.gl", module: "android-sdk")
|
|
131
|
+
}
|
|
126
132
|
|
|
127
133
|
// Dependencies
|
|
128
134
|
implementation "org.maplibre.gl:android-sdk-turf:${getConfigurableExtOrDefault('turfVersion')}"
|
|
@@ -6,6 +6,7 @@ org.maplibre.reactnative.ndkVersion=21.4.7075529
|
|
|
6
6
|
|
|
7
7
|
# MapLibre React Native
|
|
8
8
|
org.maplibre.reactnative.nativeVersion=11.8.0
|
|
9
|
+
org.maplibre.reactnative.nativeVariant=opengl
|
|
9
10
|
org.maplibre.reactnative.pluginVersion=3.0.2
|
|
10
11
|
org.maplibre.reactnative.turfVersion=6.0.1
|
|
11
12
|
org.maplibre.reactnative.okhttpVersion=4.9.0
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.withGradleProperties = exports.mergeGradleProperties = exports.getGradleProperties = exports.android =
|
|
6
|
+
exports.withGradleProperties = exports.mergeGradleProperties = exports.getGradleProperties = exports.android = void 0;
|
|
7
7
|
var _configPlugins = require("@expo/config-plugins");
|
|
8
|
-
const GRADLE_PROPERTIES_PREFIX = exports.GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative.";
|
|
9
8
|
const getGradleProperties = props => {
|
|
10
9
|
return Object.entries(props?.android || {}).reduce((properties, [key, value]) => {
|
|
11
10
|
if (key && value) {
|
|
12
11
|
properties.push({
|
|
13
12
|
type: "property",
|
|
14
|
-
key:
|
|
13
|
+
key: `org.maplibre.reactnative.${key}`,
|
|
15
14
|
value: value.toString()
|
|
16
15
|
});
|
|
17
16
|
}
|
|
@@ -20,7 +19,10 @@ const getGradleProperties = props => {
|
|
|
20
19
|
};
|
|
21
20
|
exports.getGradleProperties = getGradleProperties;
|
|
22
21
|
const mergeGradleProperties = (oldProperties, newProperties) => {
|
|
23
|
-
const
|
|
22
|
+
const newPropertiesKeys = newProperties.map(({
|
|
23
|
+
key
|
|
24
|
+
}) => key);
|
|
25
|
+
const merged = oldProperties.filter(item => !(item.type === "property" && newPropertiesKeys.includes(item.key)));
|
|
24
26
|
merged.push(...newProperties);
|
|
25
27
|
return merged;
|
|
26
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_configPlugins","require","
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","getGradleProperties","props","Object","entries","android","reduce","properties","key","value","push","type","toString","exports","mergeGradleProperties","oldProperties","newProperties","newPropertiesKeys","map","merged","filter","item","includes","withGradleProperties","config","gradleProperties","withGradlePropertiesExpo","c","modResults"],"sourceRoot":"../../../src","sources":["plugin/android.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAcO,MAAMC,mBAAmB,GAC9BC,KAA0B,IACP;EACnB,OAAOC,MAAM,CAACC,OAAO,CAACF,KAAK,EAAEG,OAAO,IAAI,CAAC,CAAC,CAAC,CAACC,MAAM,CAChD,CAACC,UAAU,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;IAC5B,IAAID,GAAG,IAAIC,KAAK,EAAE;MAChBF,UAAU,CAACG,IAAI,CAAC;QACdC,IAAI,EAAE,UAAU;QAChBH,GAAG,EAAE,4BAA4BA,GAAG,EAAE;QACtCC,KAAK,EAAEA,KAAK,CAACG,QAAQ,CAAC;MACxB,CAAC,CAAC;IACJ;IAEA,OAAOL,UAAU;EACnB,CAAC,EACD,EACF,CAAC;AACH,CAAC;AAACM,OAAA,CAAAZ,mBAAA,GAAAA,mBAAA;AAEK,MAAMa,qBAAqB,GAAGA,CACnCC,aAA+B,EAC/BC,aAA6B,KACR;EACrB,MAAMC,iBAAiB,GAAGD,aAAa,CAACE,GAAG,CAAC,CAAC;IAAEV;EAAI,CAAC,KAAKA,GAAG,CAAC;EAC7D,MAAMW,MAAM,GAAGJ,aAAa,CAACK,MAAM,CAChCC,IAAI,IACH,EAAEA,IAAI,CAACV,IAAI,KAAK,UAAU,IAAIM,iBAAiB,CAACK,QAAQ,CAACD,IAAI,CAACb,GAAG,CAAC,CACtE,CAAC;EAEDW,MAAM,CAACT,IAAI,CAAC,GAAGM,aAAa,CAAC;EAE7B,OAAOG,MAAM;AACf,CAAC;AAACN,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAEK,MAAMS,oBAAuD,GAAGA,CACrEC,MAAM,EACNtB,KAAK,KACF;EACH,MAAMuB,gBAAgB,GAAGxB,mBAAmB,CAACC,KAAK,CAAC;EAEnD,OAAO,IAAAwB,mCAAwB,EAACF,MAAM,EAAGG,CAAC,IAAK;IAC7CA,CAAC,CAACC,UAAU,GAAGd,qBAAqB,CAACa,CAAC,CAACC,UAAU,EAAEH,gBAAgB,CAAC;IAEpE,OAAOE,CAAC;EACV,CAAC,CAAC;AACJ,CAAC;AAACd,OAAA,CAAAU,oBAAA,GAAAA,oBAAA;AAEK,MAAMlB,OAAO,GAAAQ,OAAA,CAAAR,OAAA,GAAG;EACrBkB;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { withGradleProperties as withGradlePropertiesExpo } from "@expo/config-plugins";
|
|
4
|
-
export const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative.";
|
|
5
4
|
export const getGradleProperties = props => {
|
|
6
5
|
return Object.entries(props?.android || {}).reduce((properties, [key, value]) => {
|
|
7
6
|
if (key && value) {
|
|
8
7
|
properties.push({
|
|
9
8
|
type: "property",
|
|
10
|
-
key:
|
|
9
|
+
key: `org.maplibre.reactnative.${key}`,
|
|
11
10
|
value: value.toString()
|
|
12
11
|
});
|
|
13
12
|
}
|
|
@@ -15,7 +14,10 @@ export const getGradleProperties = props => {
|
|
|
15
14
|
}, []);
|
|
16
15
|
};
|
|
17
16
|
export const mergeGradleProperties = (oldProperties, newProperties) => {
|
|
18
|
-
const
|
|
17
|
+
const newPropertiesKeys = newProperties.map(({
|
|
18
|
+
key
|
|
19
|
+
}) => key);
|
|
20
|
+
const merged = oldProperties.filter(item => !(item.type === "property" && newPropertiesKeys.includes(item.key)));
|
|
19
21
|
merged.push(...newProperties);
|
|
20
22
|
return merged;
|
|
21
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["withGradleProperties","withGradlePropertiesExpo","
|
|
1
|
+
{"version":3,"names":["withGradleProperties","withGradlePropertiesExpo","getGradleProperties","props","Object","entries","android","reduce","properties","key","value","push","type","toString","mergeGradleProperties","oldProperties","newProperties","newPropertiesKeys","map","merged","filter","item","includes","config","gradleProperties","c","modResults"],"sourceRoot":"../../../src","sources":["plugin/android.ts"],"mappings":";;AAAA,SAEEA,oBAAoB,IAAIC,wBAAwB,QAC3C,sBAAsB;AAW7B,OAAO,MAAMC,mBAAmB,GAC9BC,KAA0B,IACP;EACnB,OAAOC,MAAM,CAACC,OAAO,CAACF,KAAK,EAAEG,OAAO,IAAI,CAAC,CAAC,CAAC,CAACC,MAAM,CAChD,CAACC,UAAU,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;IAC5B,IAAID,GAAG,IAAIC,KAAK,EAAE;MAChBF,UAAU,CAACG,IAAI,CAAC;QACdC,IAAI,EAAE,UAAU;QAChBH,GAAG,EAAE,4BAA4BA,GAAG,EAAE;QACtCC,KAAK,EAAEA,KAAK,CAACG,QAAQ,CAAC;MACxB,CAAC,CAAC;IACJ;IAEA,OAAOL,UAAU;EACnB,CAAC,EACD,EACF,CAAC;AACH,CAAC;AAED,OAAO,MAAMM,qBAAqB,GAAGA,CACnCC,aAA+B,EAC/BC,aAA6B,KACR;EACrB,MAAMC,iBAAiB,GAAGD,aAAa,CAACE,GAAG,CAAC,CAAC;IAAET;EAAI,CAAC,KAAKA,GAAG,CAAC;EAC7D,MAAMU,MAAM,GAAGJ,aAAa,CAACK,MAAM,CAChCC,IAAI,IACH,EAAEA,IAAI,CAACT,IAAI,KAAK,UAAU,IAAIK,iBAAiB,CAACK,QAAQ,CAACD,IAAI,CAACZ,GAAG,CAAC,CACtE,CAAC;EAEDU,MAAM,CAACR,IAAI,CAAC,GAAGK,aAAa,CAAC;EAE7B,OAAOG,MAAM;AACf,CAAC;AAED,OAAO,MAAMnB,oBAAuD,GAAGA,CACrEuB,MAAM,EACNpB,KAAK,KACF;EACH,MAAMqB,gBAAgB,GAAGtB,mBAAmB,CAACC,KAAK,CAAC;EAEnD,OAAOF,wBAAwB,CAACsB,MAAM,EAAGE,CAAC,IAAK;IAC7CA,CAAC,CAACC,UAAU,GAAGZ,qBAAqB,CAACW,CAAC,CAACC,UAAU,EAAEF,gBAAgB,CAAC;IAEpE,OAAOC,CAAC;EACV,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAMnB,OAAO,GAAG;EACrBN;AACF,CAAC","ignoreList":[]}
|
|
@@ -7,9 +7,15 @@ export type MapLibrePluginProps = {
|
|
|
7
7
|
*/
|
|
8
8
|
android?: {
|
|
9
9
|
/**
|
|
10
|
-
* Version for `org.maplibre.gl:android-sdk
|
|
10
|
+
* Version for `org.maplibre.gl:android-sdk-*`
|
|
11
11
|
*/
|
|
12
12
|
nativeVersion?: VersionString;
|
|
13
|
+
/**
|
|
14
|
+
* Variant of `org.maplibre.gl:android-sdk-*`
|
|
15
|
+
*
|
|
16
|
+
* @default "vulkan"
|
|
17
|
+
*/
|
|
18
|
+
nativeVariant?: "opengl" | "vulkan";
|
|
13
19
|
/**
|
|
14
20
|
* Version for `org.maplibre.gl:android-plugin-*-v9`
|
|
15
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLibrePluginProps.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/MapLibrePluginProps.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GACd,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,GAC/B,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAC3B;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;WAEG;QACH,WAAW,CAAC,EAAE,aAAa,CAAC;QAC5B;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;WAOG;QACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;QACtC;;WAEG;QACH,iCAAiC,CAAC,EAAE,aAAa,CAAC;KACnD,CAAC;IAEF;;;;OAIG;IACH,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,GACD,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"MapLibrePluginProps.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/MapLibrePluginProps.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GACd,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,GAC/B,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAC3B;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;;;WAIG;QACH,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;QACpC;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;WAEG;QACH,WAAW,CAAC,EAAE,aAAa,CAAC;QAC5B;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;WAOG;QACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;QACtC;;WAEG;QACH,iCAAiC,CAAC,EAAE,aAAa,CAAC;KACnD,CAAC;IAEF;;;;OAIG;IACH,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,GACD,SAAS,CAAC"}
|
|
@@ -6,7 +6,6 @@ type PropertyItem = {
|
|
|
6
6
|
key: string;
|
|
7
7
|
value: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative.";
|
|
10
9
|
export declare const getGradleProperties: (props: MapLibrePluginProps) => PropertyItem[];
|
|
11
10
|
export declare const mergeGradleProperties: (oldProperties: PropertiesItem[], newProperties: PropertyItem[]) => PropertiesItem[];
|
|
12
11
|
export declare const withGradleProperties: ConfigPlugin<MapLibrePluginProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/android.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/android.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,mBAAmB,UACvB,mBAAmB,KACzB,YAAY,EAed,CAAC;AAEF,eAAO,MAAM,qBAAqB,kBACjB,cAAc,EAAE,iBAChB,YAAY,EAAE,KAC5B,cAAc,EAUhB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,mBAAmB,CAWlE,CAAC;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
|
|
@@ -7,9 +7,15 @@ export type MapLibrePluginProps = {
|
|
|
7
7
|
*/
|
|
8
8
|
android?: {
|
|
9
9
|
/**
|
|
10
|
-
* Version for `org.maplibre.gl:android-sdk
|
|
10
|
+
* Version for `org.maplibre.gl:android-sdk-*`
|
|
11
11
|
*/
|
|
12
12
|
nativeVersion?: VersionString;
|
|
13
|
+
/**
|
|
14
|
+
* Variant of `org.maplibre.gl:android-sdk-*`
|
|
15
|
+
*
|
|
16
|
+
* @default "vulkan"
|
|
17
|
+
*/
|
|
18
|
+
nativeVariant?: "opengl" | "vulkan";
|
|
13
19
|
/**
|
|
14
20
|
* Version for `org.maplibre.gl:android-plugin-*-v9`
|
|
15
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLibrePluginProps.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/MapLibrePluginProps.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GACd,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,GAC/B,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAC3B;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;WAEG;QACH,WAAW,CAAC,EAAE,aAAa,CAAC;QAC5B;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;WAOG;QACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;QACtC;;WAEG;QACH,iCAAiC,CAAC,EAAE,aAAa,CAAC;KACnD,CAAC;IAEF;;;;OAIG;IACH,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,GACD,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"MapLibrePluginProps.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/MapLibrePluginProps.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GACd,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,GAC/B,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAC3B;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;;;WAIG;QACH,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;QACpC;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;WAEG;QACH,WAAW,CAAC,EAAE,aAAa,CAAC;QAC5B;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;WAOG;QACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;QACtC;;WAEG;QACH,iCAAiC,CAAC,EAAE,aAAa,CAAC;KACnD,CAAC;IAEF;;;;OAIG;IACH,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,GACD,SAAS,CAAC"}
|
|
@@ -6,7 +6,6 @@ type PropertyItem = {
|
|
|
6
6
|
key: string;
|
|
7
7
|
value: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative.";
|
|
10
9
|
export declare const getGradleProperties: (props: MapLibrePluginProps) => PropertyItem[];
|
|
11
10
|
export declare const mergeGradleProperties: (oldProperties: PropertiesItem[], newProperties: PropertyItem[]) => PropertiesItem[];
|
|
12
11
|
export declare const withGradleProperties: ConfigPlugin<MapLibrePluginProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/android.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/android.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,mBAAmB,UACvB,mBAAmB,KACzB,YAAY,EAed,CAAC;AAEF,eAAO,MAAM,qBAAqB,kBACjB,cAAc,EAAE,iBAChB,YAAY,EAAE,KAC5B,cAAc,EAUhB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,mBAAmB,CAWlE,CAAC;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -11,9 +11,15 @@ export type MapLibrePluginProps =
|
|
|
11
11
|
*/
|
|
12
12
|
android?: {
|
|
13
13
|
/**
|
|
14
|
-
* Version for `org.maplibre.gl:android-sdk
|
|
14
|
+
* Version for `org.maplibre.gl:android-sdk-*`
|
|
15
15
|
*/
|
|
16
16
|
nativeVersion?: VersionString;
|
|
17
|
+
/**
|
|
18
|
+
* Variant of `org.maplibre.gl:android-sdk-*`
|
|
19
|
+
*
|
|
20
|
+
* @default "vulkan"
|
|
21
|
+
*/
|
|
22
|
+
nativeVariant?: "opengl" | "vulkan";
|
|
17
23
|
/**
|
|
18
24
|
* Version for `org.maplibre.gl:android-plugin-*-v9`
|
|
19
25
|
*/
|
package/src/plugin/android.ts
CHANGED
|
@@ -12,8 +12,6 @@ type PropertyItem = {
|
|
|
12
12
|
value: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative.";
|
|
16
|
-
|
|
17
15
|
export const getGradleProperties = (
|
|
18
16
|
props: MapLibrePluginProps,
|
|
19
17
|
): PropertyItem[] => {
|
|
@@ -22,7 +20,7 @@ export const getGradleProperties = (
|
|
|
22
20
|
if (key && value) {
|
|
23
21
|
properties.push({
|
|
24
22
|
type: "property",
|
|
25
|
-
key:
|
|
23
|
+
key: `org.maplibre.reactnative.${key}`,
|
|
26
24
|
value: value.toString(),
|
|
27
25
|
});
|
|
28
26
|
}
|
|
@@ -37,12 +35,10 @@ export const mergeGradleProperties = (
|
|
|
37
35
|
oldProperties: PropertiesItem[],
|
|
38
36
|
newProperties: PropertyItem[],
|
|
39
37
|
): PropertiesItem[] => {
|
|
38
|
+
const newPropertiesKeys = newProperties.map(({ key }) => key);
|
|
40
39
|
const merged = oldProperties.filter(
|
|
41
40
|
(item) =>
|
|
42
|
-
!(
|
|
43
|
-
item.type === "property" &&
|
|
44
|
-
item.key.startsWith(GRADLE_PROPERTIES_PREFIX)
|
|
45
|
-
),
|
|
41
|
+
!(item.type === "property" && newPropertiesKeys.includes(item.key)),
|
|
46
42
|
);
|
|
47
43
|
|
|
48
44
|
merged.push(...newProperties);
|