Skip to content

Commit bb24c26

Browse files
fix: update ios/android
1 parent 9a84f51 commit bb24c26

File tree

14 files changed

+25684
-19858
lines changed

14 files changed

+25684
-19858
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ lib/
6262
# example app build files
6363
example/android/app/src/main/assets/index.android.bundle
6464
example/android/app/src/main/res/raw/app.json
65+
.yarn/*
66+
example/.yarn/*

android/build.gradle

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.2.2'
9+
classpath("com.android.tools.build:gradle")
10+
classpath("com.facebook.react:react-native-gradle-plugin")
11+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
1012
}
1113
}
1214
}
@@ -18,8 +20,9 @@ def safeExtGet(prop, fallback) {
1820
}
1921

2022
android {
21-
compileSdkVersion safeExtGet('TelematicsSdk_compileSdkVersion', 33)
22-
buildToolsVersion safeExtGet('TelematicsSdk_buildToolsVersion', '33.0.1')
23+
namespace "com.reactnativetelematicssdk"
24+
compileSdkVersion safeExtGet('TelematicsSdk_compileSdkVersion', 34)
25+
buildToolsVersion safeExtGet('TelematicsSdk_buildToolsVersion', '34.0.0')
2326
defaultConfig {
2427
minSdkVersion safeExtGet('TelematicsSdk_minSdkVersion', 21)
2528
targetSdkVersion safeExtGet('TelematicsSdk_targetSdkVersion', 33)
@@ -44,38 +47,22 @@ android {
4447

4548
rootProject.allprojects {
4649
repositories {
47-
mavenCentral {
48-
// We don't want to fetch react-native from Maven Central as there are
49-
// older versions over there.
50-
content {
51-
excludeGroup "com.facebook.react"
52-
}
53-
}
54-
google()
55-
maven {
50+
google()
51+
mavenCentral()
52+
maven {
53+
url "https://repo1.maven.org/maven2/"
54+
}
55+
maven {
5656
url "https://s3.us-east-2.amazonaws.com/android.telematics.sdk.production/"
5757
}
58+
5859
}
5960
}
6061

61-
repositories {
62-
mavenCentral {
63-
// We don't want to fetch react-native from Maven Central as there are
64-
// older versions over there.
65-
content {
66-
excludeGroup "com.facebook.react"
67-
}
68-
}
69-
maven {
70-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
71-
url("$rootDir/../node_modules/react-native/android")
72-
}
73-
google()
7462

75-
}
7663

7764
dependencies {
7865
//noinspection GradleDynamicVersion
79-
implementation "com.facebook.react:react-native:+" // From node_modules
80-
implementation "com.telematicssdk:tracking:2.2.257" // Telematics sdk
66+
implementation("com.facebook.react:react-android:0.73.0")
67+
implementation "com.telematicssdk:tracking:2.2.260" // Telematics sdk
8168
}

android/gradle.properties

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13+
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14+
15+
# When configured, Gradle will run in incubating parallel mode.
16+
# This option should only be used with decoupled projects. More details, visit
17+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18+
# org.gradle.parallel=true
19+
20+
# AndroidX package structure to make it clearer which packages are bundled with the
21+
# Android operating system, and which are packaged with your app's APK
22+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
23+
android.useAndroidX=true
24+
# Automatically convert third-party libraries to use AndroidX
25+
android.enableJetifier=true
26+
27+
# Use this property to specify which architecture you want to build.
28+
# You can also override it from the CLI using
29+
# ./gradlew <task> -PreactNativeArchitectures=x86_64
30+
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
31+
32+
# Use this property to enable support to the new architecture.
33+
# This will allow you to use TurboModules and the Fabric render in
34+
# your application. You should enable this flag either if you want
35+
# to write custom TurboModules/Fabric components OR use libraries that
36+
# are providing them.
37+
newArchEnabled=false
38+
39+
# Use this property to enable or disable the Hermes JS engine.
40+
# If set to false, you will be using JSC instead.
41+
hermesEnabled=true
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists
8+

android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
includeBuild('../node_modules/@react-native/gradle-plugin')

android/src/main/java/com/reactnativetelematicssdk/TelematicsSdkModule.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@
88

99
import androidx.annotation.NonNull;
1010

11-
import com.facebook.react.bridge.Callback;
11+
import com.facebook.react.bridge.NativeModule;
1212
import com.facebook.react.bridge.Promise;
1313
import com.facebook.react.bridge.ReactApplicationContext;
14+
import com.facebook.react.bridge.ReactContext;
1415
import com.facebook.react.bridge.ReactContextBaseJavaModule;
1516
import com.facebook.react.bridge.ReactMethod;
16-
import com.facebook.react.module.annotations.ReactModule;
17+
import java.util.Map;
18+
import java.util.HashMap;
1719

1820
import com.raxeltelematics.v2.sdk.TrackingApi;
1921
import com.raxeltelematics.v2.sdk.Settings;
2022
import com.raxeltelematics.v2.sdk.utils.permissions.PermissionsWizardActivity;
2123

22-
@ReactModule(name = TelematicsSdkModule.NAME)
24+
2325
public class TelematicsSdkModule extends ReactContextBaseJavaModule implements PreferenceManager.OnActivityResultListener {
2426
public static final String NAME = "TelematicsSdk";
2527
private static final String TAG = "TelematicsSdkModule";

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
presets: ['module:@react-native/babel-preset'],
33
};

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ android {
8282
applicationId "com.example.reactnativetelematicssdk"
8383
minSdkVersion rootProject.ext.minSdkVersion
8484
targetSdkVersion rootProject.ext.targetSdkVersion
85-
versionCode 1
85+
versionCode 11
8686
versionName "1.0"
8787
}
8888
signingConfigs {

example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "33.0.0"
5+
buildToolsVersion = "34.0.0"
66
minSdkVersion = 21
7-
compileSdkVersion = 33
8-
targetSdkVersion = 33
7+
compileSdkVersion = 34
8+
targetSdkVersion = 34
99
ndkVersion = "25.1.8937393"
1010
}
1111
repositories {

example/ios/TelematicsSdkExample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,12 +548,12 @@
548548
ENABLE_BITCODE = NO;
549549
INFOPLIST_FILE = TelematicsSdkExample/Info.plist;
550550
INFOPLIST_KEY_CFBundleDisplayName = "DemoApp Application";
551-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
551+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
552552
LD_RUNPATH_SEARCH_PATHS = (
553553
"$(inherited)",
554554
"@executable_path/Frameworks",
555555
);
556-
MARKETING_VERSION = 1.0;
556+
MARKETING_VERSION = 1.0.0;
557557
OTHER_LDFLAGS = (
558558
"$(inherited)",
559559
"-ObjC",
@@ -580,12 +580,12 @@
580580
DEVELOPMENT_TEAM = "";
581581
INFOPLIST_FILE = TelematicsSdkExample/Info.plist;
582582
INFOPLIST_KEY_CFBundleDisplayName = "DemoApp Application";
583-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
583+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
584584
LD_RUNPATH_SEARCH_PATHS = (
585585
"$(inherited)",
586586
"@executable_path/Frameworks",
587587
);
588-
MARKETING_VERSION = 1.0;
588+
MARKETING_VERSION = 1.0.0;
589589
OTHER_LDFLAGS = (
590590
"$(inherited)",
591591
"-ObjC",

0 commit comments

Comments
 (0)