Skip to content

Commit ed6822f

Browse files
committed
Merging dev into master
2 parents 02a2e1c + d129f2b commit ed6822f

File tree

187 files changed

+7740
-8333
lines changed

Some content is hidden

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

187 files changed

+7740
-8333
lines changed

.circleci/Dangerfile_Lib.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
warn("Test results not available from Firebase.")
1111
end
1212

13-
if File.file?("libs/#{ENV['CURRENT_LIB']}/build/reports/lint-results.xml")
14-
android_lint.report_file = "libs/#{ENV['CURRENT_LIB']}/build/reports/lint-results.xml"
13+
if File.file?("libs/#{ENV['CURRENT_LIB']}/build/reports/lint-results-debug.xml")
14+
android_lint.skip_gradle_task = true
15+
android_lint.report_file = "libs/#{ENV['CURRENT_LIB']}/build/reports/lint-results-debug.xml"
1516
android_lint.filtering = true
1617
android_lint.lint(inline_mode: true)
1718
else

.circleci/config.yml

+31-60
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
aliases:
22
# Docker image tags can be found here: https://circleci.com/developer/images/image/cimg/android
3-
- &cimg cimg/android:2023.08.1-node
3+
- &cimg cimg/android:2023.11.1-node
44
# Most used according to https://gs.statcounter.com/android-version-market-share/mobile-tablet/worldwide
55
- &default-api-level 33
66

@@ -70,44 +70,15 @@ executors:
7070
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false'
7171

7272
jobs:
73-
static-analysis:
74-
executor: linux
73+
pr-danger:
74+
docker:
75+
- image: cimg/ruby:3.2.2
7576
steps:
7677
- checkout
77-
- restore_cache: *restore-gradle-cache
78-
- restore_cache: *restore-node-cache
79-
- restore_cache: *restore-ruby-cache
8078
- run:
81-
name: Setup Environment
8279
command: |
83-
./install.sh
84-
sudo chmod -R a+w /var/lib/gems/ && sudo chmod -R a+w /usr/local/bin
85-
gem install bundler
8680
gem install danger
87-
gem install danger-junit
88-
gem install danger-android_lint
89-
gem install danger-jacoco
90-
echo $TEST_CREDENTIALS > ./shared/test/test_credentials.json
91-
- run:
92-
name: Run Android Lint
93-
command: ./gradlew lint
94-
when: always
95-
- run:
96-
name: Run Danger
97-
command: |
98-
if [[ $CIRCLE_BRANCH == *"pull"* ]]; then
99-
# These env vars are not set properly on rebuilds
100-
export CIRCLE_PULL_REQUEST="https://github.com/forcedotcom/SalesforceMobileSDK-Android/${CIRCLE_BRANCH}"
101-
export CIRCLE_PULL_REQUESTS="https://github.com/forcedotcom/SalesforceMobileSDK-Android/${CIRCLE_BRANCH}"
102-
export CI_PULL_REQUEST="https://github.com/forcedotcom/SalesforceMobileSDK-Android/${CIRCLE_BRANCH}"
103-
export CI_PULL_REQUESTS="https://github.com/forcedotcom/SalesforceMobileSDK-Android/${CIRCLE_BRANCH}"
104-
danger --dangerfile=.circleci/Dangerfile_PR.rb --danger_id=PR-Check --verbose
105-
else
106-
echo "No need to run Danger."
107-
fi
108-
- save_cache: *save-gradle-cache
109-
- save_cache: *save-node-cache
110-
- save_cache: *save-ruby-cache
81+
danger --dangerfile=.circleci/Dangerfile_PR.rb --danger_id=PR-Check --verbose
11182
11283
run-tests:
11384
executor: linux
@@ -124,10 +95,6 @@ jobs:
12495
default: false
12596
steps:
12697
- checkout
127-
- restore_cache: *restore-gradle-cache
128-
- restore_cache: *restore-node-cache
129-
- restore_cache: *restore-ruby-cache
130-
- run: *setup-env
13198
- when:
13299
condition: << parameters.pr >>
133100
steps:
@@ -144,22 +111,26 @@ jobs:
144111
echo -e "\n\nNo need to test << parameters.lib >> for this PR, stopping execution."
145112
circleci step halt
146113
fi
114+
- restore_cache: *restore-gradle-cache
115+
- restore_cache: *restore-node-cache
116+
- restore_cache: *restore-ruby-cache
117+
- run: *setup-env
118+
- run:
119+
name: Static Analysis
120+
command: ./gradlew libs:<< parameters.lib >>:lint
147121
- run:
148122
name: Build for Testing
149123
command: |
150-
./gradlew libs:SalesforceAnalytics:assembleAndroidTest
151-
./gradlew libs:SalesforceSDK:assembleAndroidTest
152-
./gradlew libs:SmartStore:assembleAndroidTest
153-
./gradlew libs:MobileSync:assembleAndroidTest
154-
./gradlew libs:SalesforceHybrid:assembleAndroidTest
155-
./gradlew libs:SalesforceReact:assembleAndroidTest
124+
./gradlew libs:<< parameters.lib >>:assembleAndroidTest
156125
./gradlew native:NativeSampleApps:RestExplorer:assembleDebug
126+
when: always
157127
- run:
158128
name: Authorize gcloud and set config defaults
159129
command: |
160130
echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
161131
gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json
162132
gcloud --quiet config set project mobile-apps-firebase-test
133+
when: always
163134
- run:
164135
name: Run << parameters.lib >> Tests with API << parameters.api_level >>
165136
command: |
@@ -180,8 +151,9 @@ jobs:
180151
--directories-to-pull=/sdcard \
181152
--results-dir=<< parameters.lib >>-${CIRCLE_BUILD_NUM} \
182153
--results-history-name=<< parameters.lib >> \
183-
--timeout=20m --no-auto-google-login --no-record-video --no-performance-metrics
154+
--timeout=20m --no-auto-google-login --no-record-video --no-performance-metrics --num-flaky-test-attempts=1
184155
no_output_timeout: 20m
156+
when: always
185157
- run:
186158
name: Copy test results data
187159
command: |
@@ -214,8 +186,12 @@ jobs:
214186
danger --dangerfile=.circleci/Dangerfile_Lib.rb --danger_id=<< parameters.lib >> --verbose
215187
background: true
216188
when: always
189+
environment:
190+
CURRENT_LIB: << parameters.lib >>
217191
- store_artifacts:
218192
path: firebase/
193+
- store_artifacts:
194+
path: libs/<< parameters.lib >>/build/reports/
219195
- store_test_results:
220196
path: firebase/results
221197

@@ -326,7 +302,6 @@ jobs:
326302
./gradlew :native:NativeSampleApps:AppConfigurator:assemble
327303
./gradlew :native:NativeSampleApps:ConfiguredApp:assemble
328304
./gradlew :native:NativeSampleApps:RestExplorer:assemble
329-
./gradlew :native:NativeSampleApps:MobileSyncExplorer:assemble
330305
- store_artifacts:
331306
path: native/NativeSampleApps/AppConfigurator/build/outputs/apk/
332307
destination: native-apps
@@ -336,9 +311,6 @@ jobs:
336311
- store_artifacts:
337312
path: native/NativeSampleApps/RestExplorer/build/outputs/apk/
338313
destination: native-apps
339-
- store_artifacts:
340-
path: native/NativeSampleApps/MobileSyncExplorer/build/outputs/apk/
341-
destination: native-apps
342314
- run:
343315
name: Build Hybrid Sample Apps
344316
when: always
@@ -370,7 +342,7 @@ workflows:
370342
pattern: "^pull/\\d+$"
371343
value: << pipeline.git.branch >>
372344
jobs:
373-
- static-analysis:
345+
- pr-danger:
374346
context: Android Unit Tests
375347
- run-tests:
376348
name: << matrix.lib >>
@@ -382,16 +354,15 @@ workflows:
382354
pr: [ true ]
383355

384356
# GUI Driven "Triggers" Schedule
385-
# Monday 8 PM - API 24
386-
# Monday 9 PM - API 26
387-
# Monday 10 PM - API 27
388-
# Monday 11 PM - API 30
389-
# Tuesday 12 AM - API 32
390-
# Friday 8 PM - API 25
391-
# Friday 9 PM - API 27
392-
# Friday 10 PM - API 29
393-
# Friday 11 PM - API 31
394-
# Saturday 12 AM - API 33
357+
# Monday 8 PM - API 26
358+
# Monday 9 PM - API 28
359+
# Monday 10 PM - API 30
360+
# Monday 11 PM - API 32
361+
# Tuesday 12 AM - API 34
362+
# Friday 8 PM - API 27
363+
# Friday 9 PM - API 29
364+
# Friday 10 PM - API 31
365+
# Friday 11 PM - API 33
395366
nightly-tests:
396367
when:
397368
not:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This pulls submodule dependencies from github.
2323
Introduction
2424
==
2525

26-
### What's New in 11.1.0
26+
### What's New in 12.0.0
2727
See [release notes](https://github.com/forcedotcom/SalesforceMobileSDK-Android/releases).
2828

2929
### Native Applications

build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath("com.android.tools.build:gradle:7.4.2")
12+
classpath("com.android.tools.build:gradle:8.2.0")
1313
classpath("io.github.gradle-nexus:publish-plugin:1.1.0")
14-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21")
14+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
1515
}
1616
}
1717

buildSrc/build.gradle.kts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repositories {
77
}
88

99
dependencies {
10-
implementation("com.android.tools.build:gradle:7.4.2")
11-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21")
12-
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.8.22")
10+
implementation("com.android.tools.build:gradle:8.2.0")
11+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
12+
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.21")
1313
}

buildSrc/src/main/kotlin/publish-module.gradle.kts

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if (rootProject.name == "SalesforceMobileSDK-Android") {
1515
}
1616

1717
val sourcesJar by tasks.creating(Jar::class) {
18-
archiveClassifier.set("sources")
1918
from(android.sourceSets.getByName("main").java.srcDirs)
2019
}
2120

external/shared

Submodule shared updated 38 files

gradle.properties

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
cdvCompileSdkVersion=33
2-
cdvMinSdkVersion=24
1+
cdvCompileSdkVersion=34
2+
cdvMinSdkVersion=26
33
android.useAndroidX=true
4-
android.defaults.buildfeatures.buildconfig=true
54
android.nonTransitiveRClass=true
65
android.nonFinalResIds=false
76
org.gradle.jvmargs=-Xmx4096M -Dkotlin.daemon.jvm.options\="-Xmx4096M"

gradle/wrapper/gradle-wrapper.jar

3.47 KB
Binary file not shown.
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

gradlew

+22-8
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
9087

9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
@@ -133,22 +130,29 @@ location of your Java installation."
133130
fi
134131
else
135132
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac
@@ -193,6 +197,10 @@ if "$cygwin" || "$msys" ; then
193197
done
194198
fi
195199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
196204
# Collect all arguments for the java command;
197205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198206
# shell script including quotes and variable substitutions, so put them in
@@ -205,6 +213,12 @@ set -- \
205213
org.gradle.wrapper.GradleWrapperMain \
206214
"$@"
207215

216+
# Stop when "xargs" is not available.
217+
if ! command -v xargs >/dev/null 2>&1
218+
then
219+
die "xargs is not available"
220+
fi
221+
208222
# Use "xargs" to parse quoted args.
209223
#
210224
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

+9-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4041

4142
set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44+
if %ERRORLEVEL% equ 0 goto execute
4445

4546
echo.
4647
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7576

7677
:end
7778
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
if %ERRORLEVEL% equ 0 goto mainEnd
7980

8081
:fail
8182
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8283
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
84+
set EXIT_CODE=%ERRORLEVEL%
85+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
86+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87+
exit /b %EXIT_CODE%
8588

8689
:mainEnd
8790
if "%OS%"=="Windows_NT" endlocal

0 commit comments

Comments
 (0)