[INJIMOB-3372]: Update targetSdkVersion to 35 and upgrading kotlin and gradle versions (#2040)

Signed-off-by: balachandarg-tw <balachandar.g@thoughtworks.com>
This commit is contained in:
balachandarg-tw
2025-08-01 12:29:41 +05:30
committed by GitHub
parent 726bcee6c3
commit 2b98f21d22
4 changed files with 40 additions and 24 deletions

View File

@@ -26,10 +26,10 @@ Be sure to have the following build tools installed before proceeding:
- [Gradle 8.2](https://gradle.org/install/)
- [Android SDK](https://developer.android.com/)
- minSdkVersion = 24
- compileSdkVersion = 34
- targetSdkVersion = 34
- compileSdkVersion = 35
- targetSdkVersion = 35
- ndkVersion = 21.4.7075529
- kotlinVersion = 1.9.0
- kotlinVersion = 1.9.22
### iOS
@@ -40,7 +40,7 @@ Be sure to have the following build tools installed before proceeding:
## Configuring the Environment
If you ever want to use something in your local environment based on your customization and in need of using environment files other than default (.env), you can add some variables to your .env.local file.
If you ever want to use something in your local environment based on your customization and in need of using environment files other than default (.env), you can add some variables to your .env.local file.
Create a `.env.local` file using `.env` as your template in your root directory :
```
@@ -75,8 +75,8 @@ Note: Alternative to building and running app via react native CLI, it can be bu
4.1 and above) and the app can be built and run from there.
More info here:
- [Build your app using Android Studio](https://developer.android.com/studio/run)
- [Build your app using Android Studio](https://developer.android.com/studio/run)
## Building & Running for iOS
@@ -87,25 +87,28 @@ More info here:
- [React Native - Publishing to the App Store](https://reactnative.dev/docs/publishing-to-app-store)
- [Apple Developer - Distributing Your App for Beta Testing and Releases](https://developer.apple.com/documentation/xcode/distributing-your-app-for-beta-testing-and-releases)
### Note
### Note
When application is built via IDE, metro need to be started manually (For instance, if building app via XCode open metro manually, as metro hook has been removed from building via XCode - [reference](https://github.com/facebook/react-native/issues/42173#issuecomment-1921091973)).
When application is built via IDE, metro need to be started manually (For instance, if building app via XCode open metro manually, as metro hook has been removed from building via XCode - [reference](https://github.com/facebook/react-native/issues/42173#issuecomment-1921091973)).
However, if app is built via npm commands, metro starts automatically (For instance, `npm run android:mosip` or `npm run ios`)
## Known Issues
- **Terminal Configuration Error**
When attempting to build the application using certain terminals via npm commands, you may encounter the following error:
```
Cannot start server in new windows because no terminal app was specified, use --terminal to specify, or start a dev server manually by running npm start or yarn start in other terminal window.
```
**Cause:**
- This issue occurs due to missing or incorrect terminal configuration or environment settings.
```
Cannot start server in new windows because no terminal app was specified, use --terminal to specify, or start a dev server manually by running npm start or yarn start in other terminal window.
```
**Cause:**
- This issue occurs due to missing or incorrect terminal configuration or environment settings.
**Workaround:**
- Start the development server manually by running `npm start` in a separate terminal window.
- Start the development server manually by running `npm start` in a separate terminal window.
## Contributions

View File

@@ -2,13 +2,13 @@
buildscript {
ext {
buildToolsVersion = "33.0.0"
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 34
targetSdkVersion = 34
compileSdkVersion = 35
targetSdkVersion = 35
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
kotlinVersion = "1.9.0"
kotlinVersion = "1.9.22"
}
repositories {
google()
@@ -17,7 +17,7 @@ buildscript {
mavenLocal()
}
dependencies {
classpath("com.android.tools.build:gradle:8.2")
classpath("com.android.tools.build:gradle:8.4.0")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
@@ -27,7 +27,7 @@ buildscript {
// @generated begin expo-camera-import - expo prebuild (DO NOT MODIFY) sync-f244f4f3d8bf7229102e8f992b525b8602c74770
def expoCameraMavenPath = new File(["node", "--print", "require.resolve('expo-camera/package.json')"].execute(null, rootDir).text.trim(), "../android/maven")
allprojects { repositories {
allprojects { repositories {
maven{url("https://central.sonatype.com/repository/maven-snapshots/")}
maven { url(expoCameraMavenPath) }
mavenCentral()
@@ -42,5 +42,5 @@ allprojects { repositories {
}
}
}
}
// @generated end expo-camera-import
}
// @generated end expo-camera-import

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -0,0 +1,13 @@
diff --git a/node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt b/node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt
index ae0a811..519ce3f 100644
--- a/node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt
+++ b/node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt
@@ -163,7 +163,7 @@ open class PermissionsService(val context: Context) : InternalModule, Permission
override fun isPermissionPresentInManifest(permission: String): Boolean {
try {
context.packageManager.getPackageInfo(context.packageName, PackageManager.GET_PERMISSIONS)?.run {
- return requestedPermissions.contains(permission)
+ return requestedPermissions.orEmpty().contains(permission)
}
return false
} catch (e: PackageManager.NameNotFoundException) {