react-native-maps 1.21.0-alpha.3 → 1.21.0-alpha.5

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.
@@ -17,6 +17,19 @@ buildscript {
17
17
  }
18
18
  }
19
19
 
20
+ def supportsNamespace() {
21
+ def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
22
+ def major = parsed[0].toInteger()
23
+ def minor = parsed[1].toInteger()
24
+
25
+ // Namespace support was added in 7.3.0
26
+ if (major == 7 && minor >= 3) {
27
+ return true
28
+ }
29
+
30
+ return major >= 8
31
+ }
32
+
20
33
  def isNewArchitectureEnabled() {
21
34
  return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
22
35
  }
@@ -28,9 +41,7 @@ if (isNewArchitectureEnabled()) {
28
41
  apply plugin: 'kotlin-android'
29
42
 
30
43
  android {
31
- namespace "com.rnmaps.maps"
32
- def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
33
- if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
44
+ if (supportsNamespace()) {
34
45
  namespace "com.rnmaps.maps"
35
46
  }
36
47
 
@@ -0,0 +1,51 @@
1
+ package com.rnmaps.fabric;
2
+
3
+ import com.facebook.react.bridge.Promise;
4
+ import com.facebook.react.bridge.ReactApplicationContext;
5
+ import com.facebook.react.bridge.ReadableMap;
6
+
7
+ public class NativeAirMapsModule extends NativeAirMapsModuleSpec {
8
+ public NativeAirMapsModule(ReactApplicationContext reactContext) {
9
+ super(reactContext);
10
+ }
11
+
12
+ @Override
13
+ public String getName() {
14
+ return NAME;
15
+ }
16
+
17
+ @Override
18
+ public void getCamera(double tag, Promise promise) {
19
+
20
+ }
21
+
22
+ @Override
23
+ public void getMarkersFrames(double tag, boolean onlyVisible, Promise promise) {
24
+
25
+ }
26
+
27
+ @Override
28
+ public void getMapBoundaries(double tag, Promise promise) {
29
+
30
+ }
31
+
32
+ @Override
33
+ public void takeSnapshot(double tag, ReadableMap config, Promise promise) {
34
+
35
+ }
36
+
37
+ @Override
38
+ public void getAddressFromCoordinates(double tag, ReadableMap coordinate, Promise promise) {
39
+
40
+ }
41
+
42
+ @Override
43
+ public void getPointForCoordinate(double tag, ReadableMap coordinate, Promise promise) {
44
+
45
+ }
46
+
47
+ @Override
48
+ public void getCoordinateForPoint(double tag, ReadableMap point, Promise promise) {
49
+
50
+ }
51
+ }
@@ -0,0 +1,46 @@
1
+ package com.rnmaps.maps;
2
+
3
+ import androidx.annotation.NonNull;
4
+
5
+ import com.facebook.react.TurboReactPackage;
6
+ import com.facebook.react.bridge.NativeModule;
7
+ import com.facebook.react.bridge.ReactApplicationContext;
8
+ import com.facebook.react.module.model.ReactModuleInfo;
9
+ import com.facebook.react.module.model.ReactModuleInfoProvider;
10
+ import com.rnmaps.fabric.NativeAirMapsModule;
11
+ import com.rnmaps.fabric.NativeAirMapsModuleSpec;
12
+
13
+ import java.util.HashMap;
14
+ import java.util.Map;
15
+
16
+ public class MapAirModulePackage extends TurboReactPackage {
17
+
18
+ @Override
19
+ public NativeModule getModule(String name, ReactApplicationContext reactContext) {
20
+ if (name.equals(NativeAirMapsModuleSpec.NAME)) {
21
+ return new NativeAirMapsModule(reactContext);
22
+ } else {
23
+ return null;
24
+ }
25
+ }
26
+
27
+ @Override
28
+ public ReactModuleInfoProvider getReactModuleInfoProvider() {
29
+ return new ReactModuleInfoProvider() {
30
+ @NonNull
31
+ @Override
32
+ public Map<String, ReactModuleInfo> getReactModuleInfos() {
33
+ Map<String, ReactModuleInfo> map = new HashMap<>();
34
+ map.put(NativeAirMapsModuleSpec.NAME, new ReactModuleInfo(
35
+ NativeAirMapsModuleSpec.NAME, // name
36
+ NativeAirMapsModuleSpec.NAME, // className
37
+ false, // canOverrideExistingModule
38
+ false, // needsEagerInit
39
+ false, // isCXXModule
40
+ true // isTurboModule
41
+ ));
42
+ return map;
43
+ }
44
+ };
45
+ }
46
+ }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "main": "lib/index.js",
6
6
  "author": "Leland Richardson <leland.m.richardson@gmail.com>",
7
7
  "homepage": "https://github.com/react-native-maps/react-native-maps#readme",
8
- "version": "1.21.0-alpha.3",
8
+ "version": "1.21.0-alpha.5",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",