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 May 6, 2024
2 parents 7de5ffc + 2421193 commit 71a7eac
Show file tree
Hide file tree
Showing 29 changed files with 233 additions and 93 deletions.
7 changes: 4 additions & 3 deletions .circleci/gitChangedLibs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

for prfile in prfiles
path = prfile["filename"]
for lib in libsTopoSorted
if path.include? lib
libsModified.add(lib)
libsTopoSorted.each do |lib|
if path.include?(lib)
libsModified.merge(libsTopoSorted[libsTopoSorted.index(lib)..])
break
end
end
end
Expand Down
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.0
### What's New in 12.1.0
See [release notes](https://github.com/forcedotcom/SalesforceMobileSDK-Android/releases).

### Native Applications
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {

allprojects {
group = "com.salesforce.mobilesdk"
version = "12.0.0"
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
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
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="83"
android:versionName="12.0.0">
android:versionCode="84"
android:versionName="12.1.0.dev">

<application />

Expand Down
2 changes: 1 addition & 1 deletion libs/MobileSync/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@file:Suppress("UnstableApiUsage")

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

plugins {
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="83"
android:versionName="12.0.0">
android:versionCode="84"
android:versionName="12.1.0.dev">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
2 changes: 1 addition & 1 deletion libs/SalesforceAnalytics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@file:Suppress("UnstableApiUsage")

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

plugins {
Expand Down
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="83"
android:versionName="12.0.0">
android:versionCode="84"
android:versionName="12.1.0.dev">

<application>
<activity android:name="com.salesforce.androidsdk.phonegap.ui.SalesforceDroidGapActivity"
Expand Down
2 changes: 1 addition & 1 deletion libs/SalesforceHybrid/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@file:Suppress("UnstableApiUsage")

rootProject.ext["PUBLISH_GROUP_ID"] = "com.salesforce.mobilesdk"
rootProject.ext["PUBLISH_VERSION"] = "12.0.0"
rootProject.ext["PUBLISH_VERSION"] = "12.1.0"
rootProject.ext["PUBLISH_ARTIFACT_ID"] = "SalesforceHybrid"

plugins {
Expand Down
2 changes: 1 addition & 1 deletion libs/SalesforceHybrid/res/xml/config.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
id = "com.salesforce.androidsdk"
version = "12.0.0">
version = "12.1.0">

<content src="index.html" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ open class SalesforceDroidGapActivity : CordovaActivity(), SalesforceActivityInt

/** The unauthenticated start page from the boot configuration */
@Suppress("MemberVisibilityCanBePrivate")
protected val unauthenticatedStartPage
protected open val unauthenticatedStartPage
get() = bootConfig?.unauthenticatedStartPage

fun logout(callbackContext: CallbackContext?) {
Expand Down
4 changes: 2 additions & 2 deletions libs/SalesforceReact/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="83"
android:versionName="12.0.0">
android:versionCode="84"
android:versionName="12.1.0.dev">

<application>
<activity android:name=".ui.SalesforceReactActivity"
Expand Down
2 changes: 1 addition & 1 deletion libs/SalesforceReact/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
val useIntlJsc = false

rootProject.ext["PUBLISH_GROUP_ID"] = "com.salesforce.mobilesdk"
rootProject.ext["PUBLISH_VERSION"] = "12.0.0"
rootProject.ext["PUBLISH_VERSION"] = "12.1.0"
rootProject.ext["PUBLISH_ARTIFACT_ID"] = "SalesforceReact"

plugins {
Expand Down
4 changes: 2 additions & 2 deletions libs/SalesforceReact/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SalesforceReact",
"version": "12.0.0",
"version": "12.1.0",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
Expand All @@ -9,7 +9,7 @@
"create-react-class": "^15.7.0",
"react": "18.2.0",
"react-native": "0.73.6",
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#v12.0.0"
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#dev"
},
"devDependencies": {
"chai": "4.4.1",
Expand Down
4 changes: 2 additions & 2 deletions libs/SalesforceSDK/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
Expand Down
2 changes: 1 addition & 1 deletion libs/SalesforceSDK/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@file:Suppress("UnstableApiUsage")

rootProject.ext["PUBLISH_GROUP_ID"] = "com.salesforce.mobilesdk"
rootProject.ext["PUBLISH_VERSION"] = "12.0.0"
rootProject.ext["PUBLISH_VERSION"] = "12.1.0"
rootProject.ext["PUBLISH_ARTIFACT_ID"] = "SalesforceSDK"

plugins {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ open class SalesforceSDKManager protected constructor(
}.also { field = it }

/** The Salesforce SDK manager's login server manager */
val loginServerManager by lazy {
open val loginServerManager by lazy {
LoginServerManager(appContext)
}

Expand Down Expand Up @@ -316,8 +316,8 @@ open class SalesforceSDKManager protected constructor(
* based on the value configured on the server
*/
@set:Synchronized
var isBrowserLoginEnabled = false
private set
open var isBrowserLoginEnabled = false
protected set

/** Optionally enables browser session sharing */
var isShareBrowserSessionEnabled = false
Expand Down Expand Up @@ -379,8 +379,9 @@ open class SalesforceSDKManager protected constructor(
* By default, the display name under
* [android.content.pm.ApplicationInfo.labelRes] will be used.
*/
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("provideAppName")
var appName: String? = null
open var appName: String? = null
get() = runCatching {
if (field == null) {
val packageInfo = appContext.packageManager.getPackageInfo(
Expand Down Expand Up @@ -437,7 +438,7 @@ open class SalesforceSDKManager protected constructor(
* BuildConfig.DEBUG unless another value is specified.
* @return Boolean true enables developer support features; false otherwise
*/
fun isDevSupportEnabled() = isDevSupportEnabledOverride ?: isDebugBuild
open fun isDevSupportEnabled() = isDevSupportEnabledOverride ?: isDebugBuild

/**
* Sets if developer support features are enabled.
Expand Down Expand Up @@ -486,15 +487,15 @@ open class SalesforceSDKManager protected constructor(
}

/** Login options associated with the app */
val loginOptions: LoginOptions get() = getLoginOptions(null, null)
open val loginOptions: LoginOptions get() = getLoginOptions(null, null)

/**
* Sets the login options associated with the app.
*
* @param jwt The `jwt`
* @param url The URL
*/
fun getLoginOptions(
open fun getLoginOptions(
jwt: String?,
url: String?
) = loginOptionsInternal?.apply {
Expand Down Expand Up @@ -530,10 +531,10 @@ open class SalesforceSDKManager protected constructor(
* @return True if the Salesforce Mobile SDK should automatically logout when
* the access token is revoked
*/
fun shouldLogoutWhenTokenRevoked() = true
open fun shouldLogoutWhenTokenRevoked() = true

/** The Salesforce SDK manager's user account manager */
val userAccountManager: UserAccountManager by lazy {
open val userAccountManager: UserAccountManager by lazy {
UserAccountManager.getInstance()
}

Expand All @@ -546,7 +547,7 @@ open class SalesforceSDKManager protected constructor(
* for this option. This functionality will eventually be provided by the
* backend.
*/
var shouldBlockSalesforceIntegrationUser = false
open var shouldBlockSalesforceIntegrationUser = false

/**
* Creates a NativeLoginManager instance that allows the app to use its
Expand Down Expand Up @@ -638,7 +639,7 @@ open class SalesforceSDKManager protected constructor(

/** Returns the app display name used by the passcode dialog */
@Suppress("unused")
val appDisplayString = DEFAULT_APP_DISPLAY_NAME
open val appDisplayString = DEFAULT_APP_DISPLAY_NAME

/** Returns the name of the app as defined in AndroidManifest.xml */
val applicationName
Expand Down Expand Up @@ -719,8 +720,7 @@ open class SalesforceSDKManager protected constructor(
/**
* Starts the login flow if user account has been removed.
*/
@Suppress("MemberVisibilityCanBePrivate")
protected fun startLoginPage() {
protected open fun startLoginPage() {

// Clear cookies
CookieManager.getInstance().removeAllCookies(null)
Expand Down Expand Up @@ -870,7 +870,7 @@ open class SalesforceSDKManager protected constructor(
* @param showLoginPage If true, displays the login page after removing the
* account
*/
fun logout(
open fun logout(
/* Note: Kotlin's @JvmOverloads annotations does not generate this overload */
frontActivity: Activity?,
showLoginPage: Boolean = true
Expand All @@ -889,7 +889,7 @@ open class SalesforceSDKManager protected constructor(
* account
*/
@JvmOverloads
fun logout(
open fun logout(
account: Account? = null,
frontActivity: Activity?,
showLoginPage: Boolean = true
Expand Down Expand Up @@ -1386,7 +1386,7 @@ open class SalesforceSDKManager protected constructor(
*
* @param activity The activity used to set style attributes
*/
fun setViewNavigationVisibility(activity: Activity) {
open fun setViewNavigationVisibility(activity: Activity) {
if (!isDarkTheme || activity.javaClass.name == loginActivityClass.name) {
/*
* This covers the case where OS dark theme is true, but app has
Expand All @@ -1400,7 +1400,7 @@ open class SalesforceSDKManager protected constructor(
* Determines whether the device has a compact screen.
* Taken directly from https://developer.android.com/guide/topics/large-screens/large-screen-cookbook#kotlin
*/
fun compactScreen(activity: Activity): Boolean {
open fun compactScreen(activity: Activity): Boolean {
val metrics = WindowMetricsCalculator.getOrCreate().computeMaximumWindowMetrics(activity)
val width = metrics.bounds.width()
val height = metrics.bounds.height()
Expand All @@ -1413,7 +1413,7 @@ open class SalesforceSDKManager protected constructor(

@Suppress("unused")
@OnLifecycleEvent(ON_STOP)
protected fun onAppBackgrounded() {
protected open fun onAppBackgrounded() {
screenLockManager?.onAppBackgrounded()
(biometricAuthenticationManager as? BiometricAuthenticationManager)?.onAppBackgrounded()

Expand All @@ -1425,7 +1425,7 @@ open class SalesforceSDKManager protected constructor(

@Suppress("unused")
@OnLifecycleEvent(ON_START)
protected fun onAppForegrounded() {
protected open fun onAppForegrounded() {
screenLockManager?.onAppForegrounded()
(biometricAuthenticationManager as? BiometricAuthenticationManager)?.onAppForegrounded()

Expand All @@ -1448,7 +1448,7 @@ open class SalesforceSDKManager protected constructor(
protected var INSTANCE: SalesforceSDKManager? = null

/** The current version of this SDK */
const val SDK_VERSION = "12.0.0.dev"
const val SDK_VERSION = "12.1.0.dev"

/**
* An intent action meant for instances of Salesforce SDK manager
Expand Down Expand Up @@ -1487,6 +1487,12 @@ open class SalesforceSDKManager protected constructor(
@Suppress("NON_FINAL_MEMBER_IN_OBJECT") // This allows Java subtypes to override this property without an inspector warning
open fun getInstance() = INSTANCE ?: throw RuntimeException("Apps must call SalesforceSDKManager.init() first.")

/** Allow Kotlin subclasses to set themselves as the instance. */
@JvmSynthetic
fun setInstance(subclass: SalesforceSDKManager) {
INSTANCE = subclass
}

/**
* Indicates if a Salesforce SDK manager instance is initialized.
* @return true if SalesforceSDKManager has been initialized already
Expand Down
Loading

0 comments on commit 71a7eac

Please sign in to comment.