diff --git a/.github/workflows/reusable-workflow.yaml b/.github/workflows/reusable-workflow.yaml index 7383350499..98d9610a56 100644 --- a/.github/workflows/reusable-workflow.yaml +++ b/.github/workflows/reusable-workflow.yaml @@ -46,7 +46,7 @@ jobs: uses: android-actions/setup-android@v3 - uses: gradle/actions/setup-gradle@v4 with: - gradle-version: "8.10.1" + gradle-version: "8.12.0" add-job-summary: on-failure add-job-summary-as-pr-comment: on-failure - name: Run Lint diff --git a/build.gradle.kts b/build.gradle.kts index 1acd3d8c98..c0c48533b7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath("com.android.tools.build:gradle:8.10.1") + classpath("com.android.tools.build:gradle:8.12.0") classpath("io.github.gradle-nexus:publish-plugin:2.0.0") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24") classpath("org.jacoco:org.jacoco.core:0.8.13") diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index a9885dd3a9..ccb41d494a 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -7,7 +7,7 @@ repositories { } dependencies { - implementation("com.android.tools.build:gradle:8.10.1") + implementation("com.android.tools.build:gradle:8.12.0") implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24") implementation("org.jetbrains.kotlin:kotlin-stdlib:2.0.21") } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c4cd..1b33c55baa 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ff23a68d70..d4081da476 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index fcb6fca147..23d15a9367 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -83,7 +85,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -111,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -144,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,16 +204,16 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 6689b85bee..5eed7ee845 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/libs/SalesforceReact/build.gradle.kts b/libs/SalesforceReact/build.gradle.kts index 93a91b5a7f..23d83313b0 100644 --- a/libs/SalesforceReact/build.gradle.kts +++ b/libs/SalesforceReact/build.gradle.kts @@ -42,7 +42,7 @@ android { namespace = "com.salesforce.androidsdk.reactnative" testNamespace = "com.salesforce.androidsdk.reactnative.tests" - //noinspection GradleDependency - Will be upgraded to 36 in Mobile SDK 14.0 + //noinspection GradleDependency - Will be upgraded to 36 in Mobile SDK 14.0. Also, React Native 0.81.5 requests 36. compileSdk = 35 defaultConfig { diff --git a/libs/SalesforceReact/package.json b/libs/SalesforceReact/package.json index 6bdcfe0197..3b5fac3055 100644 --- a/libs/SalesforceReact/package.json +++ b/libs/SalesforceReact/package.json @@ -9,34 +9,34 @@ "@babel/plugin-transform-private-property-in-object": "^7.24.7", "create-react-class": "^15.7.0", "jsc-android": "^250231.0.0", - "react": "19.0.0", - "react-native": "0.79.3", + "react": "19.1.0", + "react-native": "0.81.5", "react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#dev" }, "devDependencies": { "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.3", "@babel/runtime": "^7.25.0", - "@react-native-community/cli": "18.0.0", - "@react-native-community/cli-platform-android": "18.0.0", - "@react-native-community/cli-platform-ios": "18.0.0", - "@react-native/babel-preset": "0.79.3", - "@react-native/eslint-config": "0.79.3", - "@react-native/metro-config": "0.79.3", - "@react-native/typescript-config": "0.79.3", + "@react-native-community/cli": "20.0.0", + "@react-native-community/cli-platform-android": "20.0.0", + "@react-native-community/cli-platform-ios": "20.0.0", + "@react-native/babel-preset": "0.81.5", + "@react-native/eslint-config": "0.81.5", + "@react-native/metro-config": "0.81.5", + "@react-native/typescript-config": "0.81.5", "@types/jest": "^29.5.13", - "@types/react": "^19.0.0", - "@types/react-test-renderer": "^19.0.0", + "@types/react": "^19.1.0", + "@types/react-test-renderer": "^19.1.0", "babel-jest": "^30.0.0", "chai": "4.4.1", "eslint": "^8.19.0", "jest": "^29.6.3", "metro-react-native-babel-preset": "0.77.0", "prettier": "2.8.8", - "react-test-renderer": "19.0.0", - "typescript": "5.0.4" + "react-test-renderer": "19.1.0", + "typescript": "^5.8.3" }, "engines": { - "node": ">=18" + "node": ">=20" } } diff --git a/libs/SalesforceSDK/build.gradle.kts b/libs/SalesforceSDK/build.gradle.kts index d836677754..e0a59a8856 100644 --- a/libs/SalesforceSDK/build.gradle.kts +++ b/libs/SalesforceSDK/build.gradle.kts @@ -12,7 +12,7 @@ plugins { dependencies { val composeVersion = "1.8.2" // Update requires Kotlin 2. - val livecycleVersion = "2.8.7" // Update requires Kotlin 2. + val lifecycleVersion = "2.8.7" // Update requires Kotlin 2. val androidXActivityVersion = "1.10.1" api(project(":libs:SalesforceAnalytics")) @@ -29,10 +29,10 @@ dependencies { implementation("androidx.core:core-ktx:1.16.0") // Update requires API 36 compileSdk implementation("androidx.activity:activity-ktx:$androidXActivityVersion") implementation("androidx.activity:activity-compose:$androidXActivityVersion") - implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$livecycleVersion") - implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$livecycleVersion") - implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$livecycleVersion") - implementation("androidx.lifecycle:lifecycle-service:$livecycleVersion") + implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion") + implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion") + implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycleVersion") + implementation("androidx.lifecycle:lifecycle-service:$lifecycleVersion") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") // Update requires Kotlin 2. implementation("androidx.window:window:1.4.0") implementation("androidx.window:window-core:1.4.0")