Skip to content

Commit faf8d5e

Browse files
authored
fix: name conflict
2 parents e67d939 + 6dad312 commit faf8d5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+214
-201
lines changed

.github/workflows/pull_request.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
pull_request:
44
branches: [dev, main]
55

6+
concurrency:
7+
group: pr-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: true
9+
610
jobs:
711
lint:
812
runs-on: macos-latest
@@ -13,6 +17,9 @@ jobs:
1317
- name: Setup
1418
uses: ./.github/actions/setup
1519

20+
- name: Generate nitrogen code
21+
run: yarn nitrogen
22+
1623
- name: Install ktlint & swiftlint
1724
run: |
1825
brew install ktlint

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The [example app](/example/) demonstrates usage of the library. You need to run
4040

4141
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
4242

43-
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/GoogleMapsNitroExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-google-maps-plus`.
43+
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/GoogleMapsPlusExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-google-maps-plus`.
4444

4545
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-google-maps-plus` under `Android`.
4646

@@ -67,7 +67,7 @@ yarn example ios
6767
To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:
6868

6969
```sh
70-
Running "GoogleMapsNitroExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
70+
Running "GoogleMapsPlusExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
7171
```
7272

7373
Note the `"fabric":true` and `"concurrentRoot":true` properties.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require "json"
33
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
44

55
Pod::Spec.new do |s|
6-
s.name = "GoogleMapsNitro"
6+
s.name = "RNGoogleMapsPlus"
77
s.version = package["version"]
88
s.summary = package["description"]
99
s.homepage = package["homepage"]
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
2727
s.dependency 'GoogleMaps', '10.3.0'
2828
s.dependency 'SVGKit', '3.0.0'
2929

30-
load 'nitrogen/generated/ios/GoogleMapsNitro+autolinking.rb'
30+
load 'nitrogen/generated/ios/RNGoogleMapsPlus+autolinking.rb'
3131
add_nitrogen_files(s)
3232

3333
install_modules_dependencies(s)

android/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
project(GoogleMapsNitro)
1+
project(RNGoogleMapsPlus)
22
cmake_minimum_required(VERSION 3.9.0)
33

4-
set (PACKAGE_NAME GoogleMapsNitro)
4+
set (PACKAGE_NAME RNGoogleMapsPlus)
55
set (CMAKE_VERBOSE_MAKEFILE ON)
66
set (CMAKE_CXX_STANDARD 20)
77

@@ -14,7 +14,7 @@ add_library(${PACKAGE_NAME} SHARED
1414
)
1515

1616
# Add Nitrogen specs :)
17-
include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/GoogleMapsNitro+autolinking.cmake)
17+
include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/RNGoogleMapsPlus+autolinking.cmake)
1818

1919
# Set up local includes
2020
include_directories(

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
ext.getExtOrDefault = {name ->
3-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['GoogleMapsNitro_' + name]
3+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['RNGoogleMapsPlus_' + name]
44
}
55

66
repositories {
@@ -22,17 +22,17 @@ def reactNativeArchitectures() {
2222

2323
apply plugin: "com.android.library"
2424
apply plugin: "kotlin-android"
25-
apply from: '../nitrogen/generated/android/GoogleMapsNitro+autolinking.gradle'
25+
apply from: '../nitrogen/generated/android/RNGoogleMapsPlus+autolinking.gradle'
2626
apply from: "./fix-prefab.gradle"
2727

2828
apply plugin: "com.facebook.react"
2929

3030
def getExtOrIntegerDefault(name) {
31-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["GoogleMapsNitro_" + name]).toInteger()
31+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["RNGoogleMapsPlus_" + name]).toInteger()
3232
}
3333

3434
android {
35-
namespace "com.googlemapsnitro"
35+
namespace "com.rngooglemapsplus"
3636

3737
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
3838

android/gradle.properties

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
GoogleMapsNitro_kotlinVersion=2.0.21
2-
GoogleMapsNitro_minSdkVersion=26
3-
GoogleMapsNitro_targetSdkVersion=36
4-
GoogleMapsNitro_compileSdkVersion=36
5-
GoogleMapsNitro_ndkVersion=27.1.12297006
6-
GoogleMapsNitro_googlePlayServicesBaseVersion=18.8.0
7-
GoogleMapsNitro_googlePlayServicesMapsVersion=19.2.0
8-
GoogleMapsNitro_googlePlayServicesLocationVersion=21.3.0
1+
RNGoogleMapsPlus_kotlinVersion=2.0.21
2+
RNGoogleMapsPlus_minSdkVersion=26
3+
RNGoogleMapsPlus_targetSdkVersion=36
4+
RNGoogleMapsPlus_compileSdkVersion=36
5+
RNGoogleMapsPlus_ndkVersion=27.1.12297006
6+
RNGoogleMapsPlus_googlePlayServicesBaseVersion=18.8.0
7+
RNGoogleMapsPlus_googlePlayServicesMapsVersion=19.2.0
8+
RNGoogleMapsPlus_googlePlayServicesLocationVersion=21.3.0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <jni.h>
2-
#include "GoogleMapsNitroOnLoad.hpp"
2+
#include "RNGoogleMapsPlusOnLoad.hpp"
33

44
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
5-
return margelo::nitro::googlemapsnitro::initialize(vm);
5+
return margelo::nitro::rngooglemapsplus::initialize(vm);
66
}

android/src/main/java/com/googlemapsnitro/Color.kt renamed to android/src/main/java/com/rngooglemapsplus/Color.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.googlemapsnitro
1+
package com.rngooglemapsplus
22

33
import android.graphics.Color
44
import androidx.core.graphics.toColorInt

android/src/main/java/com/googlemapsnitro/GoogleMapsNitroViewImpl.kt renamed to android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.googlemapsnitro
1+
package com.rngooglemapsplus
22

33
import android.annotation.SuppressLint
44
import android.location.Location
@@ -23,11 +23,11 @@ import com.google.android.gms.maps.model.PolygonOptions
2323
import com.google.android.gms.maps.model.Polyline
2424
import com.google.android.gms.maps.model.PolylineOptions
2525

26-
class GoogleMapsNitroViewImpl(
26+
class GoogleMapsViewImpl(
2727
val reactContext: ThemedReactContext,
2828
val locationHandler: LocationHandler,
2929
val playServiceHandler: PlayServicesHandler,
30-
val markerOptions: com.googlemapsnitro.MarkerOptions,
30+
val markerOptions: com.rngooglemapsplus.MarkerOptions,
3131
) : MapView(reactContext),
3232
GoogleMap.OnCameraMoveStartedListener,
3333
GoogleMap.OnCameraMoveListener,
@@ -104,7 +104,7 @@ class GoogleMapsNitroViewImpl(
104104
}
105105

106106
onCreate(null)
107-
getMapAsync(this@GoogleMapsNitroViewImpl)
107+
getMapAsync(this@GoogleMapsViewImpl)
108108
}
109109

110110
override fun onCameraMoveStarted(reason: Int) {
@@ -653,7 +653,7 @@ class GoogleMapsNitroViewImpl(
653653
setOnMarkerClickListener(null)
654654
setOnMapClickListener(null)
655655
}
656-
this@GoogleMapsNitroViewImpl.onDestroy()
656+
this@GoogleMapsViewImpl.onDestroy()
657657
googleMap = null
658658
reactContext.removeLifecycleEventListener(this)
659659
}
@@ -684,14 +684,14 @@ class GoogleMapsNitroViewImpl(
684684
override fun onHostResume() {
685685
onUi {
686686
locationHandler.start()
687-
this@GoogleMapsNitroViewImpl.onResume()
687+
this@GoogleMapsViewImpl.onResume()
688688
}
689689
}
690690

691691
override fun onHostPause() {
692692
onUi {
693693
locationHandler.stop()
694-
this@GoogleMapsNitroViewImpl.onPause()
694+
this@GoogleMapsViewImpl.onPause()
695695
}
696696
}
697697

android/src/main/java/com/googlemapsnitro/LocationHandler.kt renamed to android/src/main/java/com/rngooglemapsplus/LocationHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.googlemapsnitro
1+
package com.rngooglemapsplus
22

33
import android.annotation.SuppressLint
44
import android.content.Intent

0 commit comments

Comments
 (0)