Skip to content

Commit

Permalink
Merging dev into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wmathurin committed Aug 15, 2024
2 parents 79c1c11 + 5d240d4 commit 15a8980
Show file tree
Hide file tree
Showing 66 changed files with 1,652 additions and 460 deletions.
17 changes: 14 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
orbs:
codecov: codecov/[email protected]

aliases:
# Docker image tags can be found here: https://circleci.com/developer/images/image/cimg/android
- &cimg cimg/android:2023.11.1-node
- &cimg cimg/android:2024.04.1-node
# Most used according to https://gs.statcounter.com/android-version-market-share/mobile-tablet/worldwide
- &default-api-level 33
- &default-api-level 34

- &gradle-cache-key
gradle-cache-v2-{{ checksum "build.gradle.kts" }}-{{
Expand Down Expand Up @@ -67,7 +70,7 @@ executors:
docker:
- image: *cimg
environment:
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false'
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false -Dkotlin.compiler.execution.strategy=in-process'

jobs:
pr-danger:
Expand Down Expand Up @@ -168,6 +171,10 @@ jobs:
exit 1
fi
when: always
- run:
name: Convert Code Coverage
command: ./gradlew libs:<< parameters.lib >>:convertCodeCoverage
when: always
- when:
condition: << parameters.pr >>
steps:
Expand All @@ -188,6 +195,10 @@ jobs:
when: always
environment:
CURRENT_LIB: << parameters.lib >>
- codecov/upload:
file: libs/<< parameters.lib >>/build/reports/jacoco/convertedCodeCoverage/convertedCodeCoverage.xml
flags: << parameters.lib >>
validate: false
- store_artifacts:
path: firebase/
- store_artifacts:
Expand Down
70 changes: 70 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Validate changes to this class with: curl -X POST --data-binary @.codecov.yml https://codecov.io/validate

codecov:
branch: dev

coverage:
precision: 2
round: down
range: "35...85"

status:
project:
default: false # disable the default status that measures entire project
SalesforceAnalytics:
target: auto
paths:
- "libs/SalesforceAnalytics/src/"
flags:
- SalesforceAnalytics
SalesforceSDK:
target: auto
paths:
- "libs/SalesforceSDK/src/"
flags:
- SalesforceSDK
SalesforceHybrid:
target: auto
paths:
- "libs/SalesforceHybrid/src/"
flags:
- SalesforceHybrid
SmartStore:
target: auto
paths:
- "libs/SmartStore/src/"
flags:
- SmartStore
MobileSync:
target: auto
paths:
- "libs/MobileSync/src/"
flags:
- MobileSync
SalesforceReact:
target: auto
paths:
- "libs/SalesforceReact/src/"
flags:
- SalesforceReact
RestExplorer:
target: auto
paths:
- "native/NativeSampleApps/RestExplorer/src/"
flags:
- RestExplorer

ignore:
- "hybrid"
- "native"
- "test"
- "libs/**/src/com/salesforce/androidsdk/**/util/test"

flag_management:
default_rules: # the rules that will be followed for any flag added, generally
carryforward: true

comment:
layout: "diff, flags, files"
behavior: default
require_changes: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This pulls submodule dependencies from github.
Introduction
==

### What's New in 12.0.1
### What's New in 12.1.0
See [release notes](https://github.com/forcedotcom/SalesforceMobileSDK-Android/releases).

### Native Applications
Expand Down
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ buildscript {
}

dependencies {
classpath("com.android.tools.build:gradle:8.2.0")
classpath("com.android.tools.build:gradle:8.5.0")
classpath("io.github.gradle-nexus:publish-plugin:1.1.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
classpath("org.jacoco:org.jacoco.core:0.8.12")
}
}

allprojects {
group = "com.salesforce.mobilesdk"
version = "12.0.1"
version = "12.1.0"

// Ensure that we do not use newer language features that would make the SDK incompatible with
// apps that do not target the latest version of Kotlin.
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repositories {
}

dependencies {
implementation("com.android.tools.build:gradle:8.2.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.21")
implementation("com.android.tools.build:gradle:8.5.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.24")
}
2 changes: 1 addition & 1 deletion external/cordova/cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
under the License.
*/
;(function() {
var PLATFORM_VERSION_BUILD_LABEL = '11.0.0';
var PLATFORM_VERSION_BUILD_LABEL = '13.0.0';
// file: src/scripts/require.js
var require;
var define;
Expand Down
2 changes: 1 addition & 1 deletion external/shared
Submodule shared updated 34 files
+1 −1 gen/cordova_plugins.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.mobilesync.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.network.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.oauth.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.sdkinfo.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.sfaccountmanager.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.smartstore.client.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.smartstore.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.bootstrap.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.event.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.exec.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.logger.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.promiser.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.push.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.mobilesync.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.network.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.oauth.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.sdkinfo.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.sfaccountmanager.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.smartstore.client.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.smartstore.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.bootstrap.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.event.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.exec.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.logger.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.promiser.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.push.js
+1 −1 libs/cordova.force.js
+1 −1 package.json
+1 −1 test/MockSDKInfo.js
+1 −1 test/SFSDKInfoTestSuite.js
+1 −1 test/SFTestRunnerPlugin.js
+1 −1 tools/bower.json
+1 −1 tools/package.json
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion hybrid/HybridSampleApps/AccountEditor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

dependencies {
api(project(":libs:SalesforceHybrid"))
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.core:core-ktx:1.13.1")
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

dependencies {
api(project(":libs:SalesforceHybrid"))
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.core:core-ktx:1.13.1")
}

android {
Expand Down
4 changes: 2 additions & 2 deletions libs/MobileSync/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="84"
android:versionName="12.0.1">
android:versionCode="85"
android:versionName="12.1.0.dev">

<application />

Expand Down
34 changes: 27 additions & 7 deletions libs/MobileSync/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
@file:Suppress("UnstableApiUsage")

rootProject.ext["PUBLISH_GROUP_ID"] = "com.salesforce.mobilesdk"
rootProject.ext["PUBLISH_VERSION"] = "12.0.1"
rootProject.ext["PUBLISH_VERSION"] = "12.1.0"
rootProject.ext["PUBLISH_ARTIFACT_ID"] = "MobileSync"

plugins {
`android-library`
`kotlin-android`
`publish-module`
jacoco
}

dependencies {
api(project(":libs:SmartStore"))
api("androidx.appcompat:appcompat:1.6.1")
api("androidx.appcompat:appcompat-resources:1.6.1")
implementation("androidx.core:core-ktx:1.12.0")
androidTestImplementation("androidx.test:runner:1.5.2")
androidTestImplementation("androidx.test:rules:1.5.0")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
api("androidx.appcompat:appcompat:1.7.0")
api("androidx.appcompat:appcompat-resources:1.7.0")
implementation("androidx.core:core-ktx:1.13.1")
androidTestImplementation("androidx.test:runner:1.6.0")
androidTestImplementation("androidx.test:rules:1.6.0")
androidTestImplementation("androidx.test.ext:junit:1.2.0")
}

android {
Expand Down Expand Up @@ -76,6 +77,25 @@ android {
aidl = true
buildConfig = true
}

val convertCodeCoverage: TaskProvider<JacocoReport> = tasks.register<JacocoReport>("convertedCodeCoverage") {
group = "Coverage"
description = "Convert coverage.ec from Firebase Test Lab to XML that is usable by CodeCov."
}

convertCodeCoverage {
reports {
xml.required = true
html.required = true
}

sourceDirectories.setFrom("${project.projectDir}/src/main/java")
val fileFilter = arrayListOf("**/R.class", "**/R\$*.class", "**/BuildConfig.*", "**/Manifest*.*", "**/*Test*.*", "android/**/*.*")
val javaTree = fileTree("${project.projectDir}/build/intermediates/javac/debug") { setExcludes(fileFilter) }
val kotlinTree = fileTree("${project.projectDir}/build/tmp/kotlin-classes/debug") { setExcludes(fileFilter) }
classDirectories.setFrom(javaTree, kotlinTree)
executionData.setFrom(fileTree("$rootDir/firebase/artifacts/sdcard") { setIncludes(arrayListOf("*.ec")) })
}
}

kotlin {
Expand Down
4 changes: 2 additions & 2 deletions libs/SalesforceAnalytics/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="84"
android:versionName="12.0.1">
android:versionCode="85"
android:versionName="12.1.0.dev">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
32 changes: 26 additions & 6 deletions libs/SalesforceAnalytics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
@file:Suppress("UnstableApiUsage")

rootProject.ext["PUBLISH_GROUP_ID"] = "com.salesforce.mobilesdk"
rootProject.ext["PUBLISH_VERSION"] = "12.0.1"
rootProject.ext["PUBLISH_VERSION"] = "12.1.0"
rootProject.ext["PUBLISH_ARTIFACT_ID"] = "SalesforceAnalytics"

plugins {
`android-library`
`kotlin-android`
`publish-module`
jacoco
}

dependencies {
api("com.squareup:tape:1.2.3")
api("io.github.pilgr:paperdb:2.7.2")
implementation("androidx.core:core-ktx:1.12.0")
androidTestImplementation("androidx.test:runner:1.5.2")
androidTestImplementation("androidx.test:rules:1.5.0")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
implementation("androidx.core:core-ktx:1.13.1")
androidTestImplementation("androidx.test:runner:1.6.0")
androidTestImplementation("androidx.test:rules:1.6.0")
androidTestImplementation("androidx.test.ext:junit:1.2.0")
}

android {
Expand Down Expand Up @@ -75,4 +76,23 @@ android {
aidl = true
buildConfig = true
}
}

val convertCodeCoverage: TaskProvider<JacocoReport> = tasks.register<JacocoReport>("convertedCodeCoverage") {
group = "Coverage"
description = "Convert coverage.ec from Firebase Test Lab to XML that is usable by CodeCov."
}

convertCodeCoverage {
reports {
xml.required = true
html.required = true
}

sourceDirectories.setFrom("${project.projectDir}/src/main/java")
val fileFilter = arrayListOf("**/R.class", "**/R\$*.class", "**/BuildConfig.*", "**/Manifest*.*", "**/*Test*.*", "android/**/*.*")
val javaTree = fileTree("${project.projectDir}/build/intermediates/javac/debug") { setExcludes(fileFilter) }
val kotlinTree = fileTree("${project.projectDir}/build/tmp/kotlin-classes/debug") { setExcludes(fileFilter) }
classDirectories.setFrom(javaTree, kotlinTree)
executionData.setFrom(fileTree("$rootDir/firebase/artifacts/sdcard") { setIncludes(arrayListOf("*.ec")) })
}
}
4 changes: 2 additions & 2 deletions libs/SalesforceHybrid/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="84"
android:versionName="12.0.1">
android:versionCode="85"
android:versionName="12.1.0.dev">

<application>
<activity android:name="com.salesforce.androidsdk.phonegap.ui.SalesforceDroidGapActivity"
Expand Down
Loading

0 comments on commit 15a8980

Please sign in to comment.