Skip to content

Commit 3030b68

Browse files
committed
feat: add support for the new architecture (TurboModule/Fabric)
1 parent b157d9b commit 3030b68

Some content is hidden

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

58 files changed

+23950
-15312
lines changed

.yarnrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
5+
nmHoistingLimits: workspaces
6+
7+
nodeLinker: node-modules

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@
2626

2727
- Update json response's country code key ([8c249c7058c40b69ad9a8d2e3f7b14e455f2d74a](https://github.com/dev-family/react-native-device-country/pull/3/commits/8c249c7058c40b69ad9a8d2e3f7b14e455f2d74a) by [@juancarlosqr](https://github.com/juancarlosqr))
2828
- Fixed deprecated Objective-C method [#2](https://github.com/dev-family/react-native-device-country/issues/2)
29+
30+
## v2.0.0
31+
32+
### Added
33+
34+
- feat: add support for the new architecture (TurboModule/Fabric)

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Get device location settings without using GPS tracker or by telephony (SIM card
2020

2121
## Installation
2222

23+
- react-native-device-country V2 requires the new architecture/TurboModules to be enabled
24+
- for old architecture please use react-native-device-country V1.1.1
25+
2326
```sh
2427
yarn add react-native-device-country
2528
```

android/build.gradle

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,30 @@ buildscript {
22
if (project == rootProject) {
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.4.0'
9+
classpath 'com.android.tools.build:gradle:8.7.2'
10+
1011
}
1112
}
1213
}
1314

1415
apply plugin: 'com.android.library'
16+
apply plugin: "kotlin-android"
17+
apply plugin: "com.facebook.react"
1518

1619
def safeExtGet(prop, fallback) {
1720
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
1821
}
1922

2023
android {
21-
compileSdkVersion safeExtGet('DeviceCountry_compileSdkVersion', 33)
22-
buildToolsVersion safeExtGet('DeviceCountry_buildToolsVersion', '29.0.2')
24+
namespace "com.reactnativedevicecountry"
25+
compileSdkVersion safeExtGet('DeviceCountry_compileSdkVersion', 34)
26+
buildToolsVersion safeExtGet('DeviceCountry_buildToolsVersion', '33.0.0')
2327
defaultConfig {
24-
minSdkVersion safeExtGet('DeviceCountry_minSdkVersion', 23)
28+
minSdkVersion safeExtGet('DeviceCountry_minSdkVersion', 21)
2529
targetSdkVersion safeExtGet('DeviceCountry_targetSdkVersion', 33)
2630
versionCode 1
2731
versionName "1.0"
@@ -50,10 +54,16 @@ repositories {
5054
}
5155
google()
5256
mavenCentral()
53-
jcenter()
5457
}
5558

5659
dependencies {
57-
//noinspection GradleDynamicVersion
58-
implementation "com.facebook.react:react-native:+" // From node_modules
60+
implementation "com.facebook.react:react-android"
61+
implementation 'com.google.android.gms:play-services-pay:16.5.0'
62+
implementation "com.google.android.gms:play-services-wallet:19.4.0"
5963
}
64+
65+
react {
66+
jsRootDir = file("../src/")
67+
libraryName = "NativeDeviceCountry"
68+
codegenJavaPackageName = "com.reactnativedevicecountry"
69+
}
42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

android/gradlew

Lines changed: 251 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)