Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task(SDK-3710) - Upgrades gradle version to 8.2.2. #377

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ project.ext.react = [
nodeExecutableAndArgs: ["/usr/local/bin/node"]
]

apply from: "../../node_modules/react-native/react.gradle"

/**
* Set this to true to create two separate APKs instead of one:
Expand Down Expand Up @@ -158,6 +157,7 @@ android {
keyPassword 'android'
}
}
namespace 'com.reactnct'
buildTypes {
debug {
signingConfig signingConfigs.debug
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions Example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.reactnct">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<!-- Recommended so that CleverTap knows when to attempt a network call -->
Expand Down
6 changes: 3 additions & 3 deletions Example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "20.1.5948944"
ndkVersion = "26.2.11394342"
}
repositories {
google()
Expand All @@ -25,8 +25,8 @@ buildscript {
maven { url "https://maven.google.com" }
}
dependencies {
classpath('com.android.tools.build:gradle:7.3.1')
classpath ('com.google.gms:google-services:4.3.5')
classpath('com.android.tools.build:gradle:8.2.2')
classpath ('com.google.gms:google-services:4.4.1')
classpath("com.facebook.react:react-native-gradle-plugin")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
8 changes: 5 additions & 3 deletions Example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand All @@ -27,5 +27,7 @@ android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.125.0

android.enableDexingArtifactTransform.desugaring=false
hermesEnabled=true
hermesEnabled=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion Example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion Example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apply from: file("../node_modules/@react-native-community/cli-platform-android/n
include ':app'
include ':clevertap-react-native'
project(':clevertap-react-native').projectDir = new File(settingsDir, '../node_modules/clevertap-react-native/android')
includeBuild('../node_modules/react-native-gradle-plugin')
includeBuild('../node_modules/@react-native/gradle-plugin')



44 changes: 29 additions & 15 deletions Example/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
/* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/

module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');

const defaultConfig = getDefaultConfig(__dirname);

const {
resolver: { sourceExts, assetExts },
} = getDefaultConfig(__dirname);

const config = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
};

module.exports = mergeConfig(defaultConfig, config);
6 changes: 4 additions & 2 deletions Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@
"lint": "eslint ."
},
"dependencies": {
"@react-native/metro-config": "^0.72.12",
"@react-navigation/drawer": "^6.6.2",
"@react-navigation/native": "^6.1.6",
"@react-navigation/native-stack": "^6.9.12",
"clevertap-react-native": "git+https://github.com/CleverTap/clevertap-react-native#develop",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native": "0.73.5",
"react-native-drawer": "^2.5.1",
"react-native-gesture-handler": "^1.10.3",
"react-native-pager-view": "^5.1.2",
"react-native-reanimated": "^3.1.0",
"react-native-reanimated": "^3.4.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.22.0",
"react-native-svg-transformer": "^1.3.0",
"react-native-tab-view": "^3.0.1",
"react-navigation-drawer": "^2.7.0"
},
Expand Down
5 changes: 3 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ buildscript {
name 'Google'
}
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:8.2.2'
}
}

Expand All @@ -24,6 +23,8 @@ android {
versionCode 210
versionName "2.1.0"
}

namespace 'com.clevertap.react'
buildTypes {
release {
minifyEnabled false
Expand Down
3 changes: 2 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
android.useAndroidX=true
android.useAndroidX=true
android.enableJetifier=true
6 changes: 3 additions & 3 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Oct 06 22:41:12 IST 2020
#Tue Mar 05 15:25:40 IST 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
3 changes: 1 addition & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.clevertap.react">
<manifest>
<application>
</application>
</manifest>