expo-maps 0.0.2 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -10,6 +10,22 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.2.0 — 2023-09-04
14
+
15
+ ### 🎉 New features
16
+
17
+ - Added support for React Native 0.73. ([#24018](https://github.com/expo/expo/pull/24018) by [@kudo](https://github.com/kudo))
18
+
19
+ ## 0.1.0 — 2023-06-21
20
+
21
+ ### 🐛 Bug fixes
22
+
23
+ - Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))
24
+
25
+ ### 💡 Others
26
+
27
+ - Moved the Google-Maps-iOS-Utils dependency to rely on git remote instead of a published package. ([#21249](https://github.com/expo/expo/pull/21249) by [@aleqsio](https://github.com/aleqsio))
28
+
13
29
  ## 0.0.2 — 2023-02-09
14
30
 
15
31
  _This version does not introduce any user-facing changes._
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '0.0.2'
6
+ version = '0.2.0'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -35,19 +35,11 @@ buildscript {
35
35
  }
36
36
  }
37
37
 
38
- // Creating sources with comments
39
- task androidSourcesJar(type: Jar) {
40
- classifier = 'sources'
41
- from android.sourceSets.main.java.srcDirs
42
- }
43
-
44
38
  afterEvaluate {
45
39
  publishing {
46
40
  publications {
47
41
  release(MavenPublication) {
48
42
  from components.release
49
- // Add additional sourcesJar to artifacts
50
- artifact(androidSourcesJar)
51
43
  }
52
44
  }
53
45
  repositories {
@@ -61,24 +53,33 @@ afterEvaluate {
61
53
  android {
62
54
  compileSdkVersion safeExtGet("compileSdkVersion", 33)
63
55
 
64
- compileOptions {
65
- sourceCompatibility JavaVersion.VERSION_11
66
- targetCompatibility JavaVersion.VERSION_11
67
- }
56
+ def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
57
+ if (agpVersion.tokenize('.')[0].toInteger() < 8) {
58
+ compileOptions {
59
+ sourceCompatibility JavaVersion.VERSION_11
60
+ targetCompatibility JavaVersion.VERSION_11
61
+ }
68
62
 
69
- kotlinOptions {
70
- jvmTarget = JavaVersion.VERSION_11.majorVersion
63
+ kotlinOptions {
64
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
65
+ }
71
66
  }
72
67
 
68
+ namespace "expo.modules.maps"
73
69
  defaultConfig {
74
70
  minSdkVersion safeExtGet("minSdkVersion", 21)
75
71
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
76
72
  versionCode 1
77
- versionName '0.0.2'
73
+ versionName '0.2.0'
78
74
  }
79
75
  lintOptions {
80
76
  abortOnError false
81
77
  }
78
+ publishing {
79
+ singleVariant("release") {
80
+ withSourcesJar()
81
+ }
82
+ }
82
83
  }
83
84
 
84
85
  repositories {
@@ -1,3 +1,2 @@
1
- <manifest package="expo.modules.maps"
2
- xmlns:android="http://schemas.android.com/apk/res/android">
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
3
2
  </manifest>
@@ -2,7 +2,6 @@ package expo.modules.maps
2
2
 
3
3
  import com.facebook.react.bridge.ReactApplicationContext
4
4
  import com.facebook.react.uimanager.UIManagerModule
5
- import expo.modules.core.interfaces.services.UIManager
6
5
  import expo.modules.kotlin.Promise
7
6
  import expo.modules.kotlin.modules.Module
8
7
  import expo.modules.kotlin.modules.ModuleDefinition
@@ -31,7 +30,7 @@ class ExpoGoogleMapsModule : Module() {
31
30
  }
32
31
  }
33
32
 
34
- ViewManager {
33
+ View(GoogleMapsView::class) {
35
34
  Events(
36
35
  "onMapPress",
37
36
  "onLongPress",
@@ -50,13 +49,6 @@ class ExpoGoogleMapsModule : Module() {
50
49
  "onLocationChange"
51
50
  )
52
51
 
53
- View {
54
- GoogleMapsView(it).also { googleMapsView ->
55
- appContext.legacyModule<UIManager>()
56
- ?.registerLifecycleEventListener(googleMapsView.lifecycleEventListener)
57
- }
58
- }
59
-
60
52
  OnViewDestroys<GoogleMapsView> {
61
53
  it.onViewDestroyed()
62
54
  }
@@ -7,6 +7,8 @@ import com.google.android.gms.maps.MapView
7
7
  import com.google.android.gms.maps.OnMapReadyCallback
8
8
  import com.google.android.gms.maps.model.MapStyleOptions
9
9
  import com.google.maps.android.collections.MarkerManager
10
+ import expo.modules.core.interfaces.services.UIManager
11
+ import expo.modules.kotlin.AppContext
10
12
  import expo.modules.kotlin.Promise
11
13
  import expo.modules.kotlin.viewevent.EventDispatcher
12
14
  import expo.modules.maps.*
@@ -16,7 +18,7 @@ import kotlinx.coroutines.*
16
18
  import kotlinx.coroutines.flow.MutableStateFlow
17
19
  import kotlinx.coroutines.flow.collectLatest
18
20
 
19
- class GoogleMapsView(context: Context) : LinearLayout(context), OnMapReadyCallback, ExpoMapView {
21
+ class GoogleMapsView(context: Context, appContext: AppContext) : LinearLayout(context), OnMapReadyCallback, ExpoMapView {
20
22
 
21
23
  private val mapView: MapView = MapView(context)
22
24
  private lateinit var googleMap: GoogleMap
@@ -63,6 +65,9 @@ class GoogleMapsView(context: Context) : LinearLayout(context), OnMapReadyCallba
63
65
  mapView.onStart()
64
66
  mapView.onResume()
65
67
  addView(mapView)
68
+
69
+ appContext.legacyModule<UIManager>()
70
+ ?.registerLifecycleEventListener(lifecycleEventListener)
66
71
  }
67
72
 
68
73
  override fun onMapReady(googleMap: GoogleMap) {
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
18
18
  s.requires_arc = true
19
19
 
20
20
  s.dependency 'ExpoModulesCore'
21
- s.dependency 'GoogleMaps', '7.1.0'
21
+ s.dependency 'GoogleMaps', '7.3.0'
22
22
  # s.dependency 'Google-Maps-iOS-Utils', '4.1.0'
23
- s.dependency 'GooglePlaces', '7.1.0'
23
+ s.dependency 'GooglePlaces', '7.3.0'
24
24
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-maps",
3
- "version": "0.0.2",
3
+ "version": "0.2.0",
4
4
  "description": "ExpoMaps standalone module",
5
5
  "main": "build/Map.js",
6
6
  "types": "build/Map.d.ts",
@@ -41,5 +41,5 @@
41
41
  "jest": {
42
42
  "preset": "expo-module-scripts/ios"
43
43
  },
44
- "gitHead": "1f8a6a09570fd451378565ca34933018ce48454e"
44
+ "gitHead": "79607a7325f47aa17c36d266100d09a4ff2cc544"
45
45
  }
package/tsconfig.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "outDir": "./build"
6
6
  },
7
7
  "include": ["./src"],
8
- "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__stories__/*"]
8
+ "exclude": ["**/__mocks__/*", "**/__tests__/*"]
9
9
  }