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 29, 2024
2 parents 9dd18af + 2407c1a commit ef91e91
Show file tree
Hide file tree
Showing 27 changed files with 66 additions and 137 deletions.
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.1.0
### What's New in 12.2.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 @@ -18,7 +18,7 @@ buildscript {

allprojects {
group = "com.salesforce.mobilesdk"
version = "12.1.0"
version = "12.2.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="85"
android:versionName="12.1.0">
android:versionCode="86"
android:versionName="12.2.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.1.0"
rootProject.ext["PUBLISH_VERSION"] = "12.2.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="85"
android:versionName="12.1.0">
android:versionCode="86"
android:versionName="12.2.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.1.0"
rootProject.ext["PUBLISH_VERSION"] = "12.2.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="85"
android:versionName="12.1.0">
android:versionCode="86"
android:versionName="12.2.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.1.0"
rootProject.ext["PUBLISH_VERSION"] = "12.2.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.1.0">
version = "12.2.0">

<content src="index.html" />

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="85"
android:versionName="12.1.0">
android:versionCode="86"
android:versionName="12.2.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.1.0"
rootProject.ext["PUBLISH_VERSION"] = "12.2.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.1.0",
"version": "12.2.0",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
Expand All @@ -10,7 +10,7 @@
"create-react-class": "^15.7.0",
"react": "18.2.0",
"react-native": "0.74.3",
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#v12.1.0"
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#dev"
},
"devDependencies": {
"@babel/core": "^7.20.0",
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="85"
android:versionName="12.1.0">
android:versionCode="86"
android:versionName="12.2.0.dev">

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
Expand Down
4 changes: 2 additions & 2 deletions 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.1.0"
rootProject.ext["PUBLISH_VERSION"] = "12.2.0"
rootProject.ext["PUBLISH_ARTIFACT_ID"] = "SalesforceSDK"

plugins {
Expand All @@ -22,7 +22,7 @@ dependencies {
implementation("androidx.biometric:biometric:1.2.0-alpha05")
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.2")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.4")
implementation("androidx.window:window:1.3.0")
implementation("androidx.window:window-core:1.3.0")
androidTestImplementation("androidx.test:runner:1.6.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ open class SalesforceSDKManager protected constructor(
protected var INSTANCE: SalesforceSDKManager? = null

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

/**
* An intent action meant for instances of Salesforce SDK manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public class HttpAccess {

private String userAgent;
private OkHttpClient okHttpClient;
private OkHttpClient.Builder okHttpBuilder;
private OkHttpClient.Builder unauthenticatedOkHttpBuilder;

// Connection manager.
private final ConnectivityManager conMgr;
Expand Down Expand Up @@ -100,26 +98,41 @@ public HttpAccess(Context app, String userAgent) {
*
* @return okHttpClient.Builder with appropriate connection spec
* and user agent interceptor for an authenticated client.
*
* @deprecated To be removed in 14.0. Please use {@link #createNewClientBuilder()} instead.
*/
@Deprecated
public OkHttpClient.Builder getOkHttpClientBuilder() {
if (okHttpBuilder == null) {
okHttpBuilder = createNewClientBuilder();
}

return okHttpBuilder;
return createNewClientBuilder();
}

/**
*
* @return okHttpClient.Builder with appropriate connection spec
* and user agent interceptor for an unauthenticated client.
*
* @deprecated To be removed in 14.0. Please use {@link #createNewClientBuilder()} instead.
*/
@Deprecated
public OkHttpClient.Builder getUnauthenticatedOkHttpBuilder() {
if (unauthenticatedOkHttpBuilder == null) {
unauthenticatedOkHttpBuilder = createNewClientBuilder();
}
return createNewClientBuilder();
}

return unauthenticatedOkHttpBuilder;
/**
* Creates a new OkHttp Client Builder with appropriate connection spec
* and user agent interceptor.
*
* @return the okHttpClient.Builder
*/
public OkHttpClient.Builder createNewClientBuilder() {
ConnectionSpec connectionSpec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
.tlsVersions(TlsVersion.TLS_1_1, TlsVersion.TLS_1_2)
.build();
return new OkHttpClient.Builder()
.connectionSpecs(Collections.singletonList(connectionSpec))
.connectTimeout(CONNECT_TIMEOUT, TimeUnit.SECONDS)
.readTimeout(READ_TIMEOUT, TimeUnit.SECONDS)
.addNetworkInterceptor(new UserAgentInterceptor());
}

/**
Expand All @@ -128,7 +141,7 @@ public OkHttpClient.Builder getUnauthenticatedOkHttpBuilder() {
*/
public synchronized OkHttpClient getOkHttpClient() {
if (okHttpClient == null) {
okHttpClient = getOkHttpClientBuilder().build();
okHttpClient = createNewClientBuilder().build();
}
return okHttpClient;
}
Expand Down Expand Up @@ -158,17 +171,6 @@ public String getUserAgent() {
return userAgent;
}

private OkHttpClient.Builder createNewClientBuilder() {
ConnectionSpec connectionSpec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
.tlsVersions(TlsVersion.TLS_1_1, TlsVersion.TLS_1_2)
.build();
return new OkHttpClient.Builder()
.connectionSpecs(Collections.singletonList(connectionSpec))
.connectTimeout(CONNECT_TIMEOUT, TimeUnit.SECONDS)
.readTimeout(READ_TIMEOUT, TimeUnit.SECONDS)
.addNetworkInterceptor(new UserAgentInterceptor());
}

/**
* Exception thrown if the device is offline, during an attempted HTTP call.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,9 @@ private synchronized void setOkHttpClientBuilder() {

// If none cached, create new one
if (okHttpClientBuilder == null) {
if (cacheKey.equals("unauthenticated")) {
okHttpClientBuilder = httpAccessor.getUnauthenticatedOkHttpBuilder();
} else {
okHttpClientBuilder = httpAccessor.getOkHttpClientBuilder()
.addInterceptor(getOAuthRefreshInterceptor());
okHttpClientBuilder = httpAccessor.createNewClientBuilder();
if (!cacheKey.equals("unauthenticated")) {
okHttpClientBuilder.addInterceptor(getOAuthRefreshInterceptor());
}

OK_CLIENT_BUILDERS.put(getCacheKey(), okHttpClientBuilder);
Expand Down
4 changes: 2 additions & 2 deletions libs/SmartStore/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="85"
android:versionName="12.1.0">
android:versionCode="86"
android:versionName="12.2.0.dev">

<application>

Expand Down
4 changes: 2 additions & 2 deletions libs/SmartStore/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.1.0"
rootProject.ext["PUBLISH_VERSION"] = "12.2.0"
rootProject.ext["PUBLISH_ARTIFACT_ID"] = "SmartStore"

plugins {
Expand All @@ -15,7 +15,7 @@ dependencies {
api(project(":libs:SalesforceSDK"))
//noinspection GradleDependency - Needs to line up with supported SQLCipher version.
api("androidx.sqlite:sqlite:2.2.0")
api("net.zetetic:sqlcipher-android:4.6.0")
api("net.zetetic:sqlcipher-android:4.6.1")
implementation("androidx.core:core-ktx:1.13.1")
androidTestImplementation("androidx.test:runner:1.6.0")
androidTestImplementation("androidx.test:rules:1.6.0")
Expand Down
2 changes: 1 addition & 1 deletion libs/test/SalesforceHybridTest/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.1.0">
version = "12.2.0">

<content src="index.html" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void testRuntimeSettings() {
*/
@Test
public void testSQLCipherVersion() {
Assert.assertEquals("Wrong sqlcipher version", "4.6.0 community", store.getSQLCipherVersion());
Assert.assertEquals("Wrong sqlcipher version", "4.6.1 community", store.getSQLCipherVersion());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public class ExplorerActivity extends SalesforceActivity {
private RestClient client;
private TextView resultText;
private TabHost tabHost;
private LogoutDialogFragment logoutConfirmationDialog;

// Use for objectId fields auto-complete.
private TreeSet<String> knownIds = new TreeSet<String>();
Expand Down Expand Up @@ -129,8 +128,6 @@ protected void onCreate(Bundle savedInstanceState) {
// Makes the result area scrollable.
resultText = (TextView) findViewById(R.id.result_text);
resultText.setMovementMethod(new ScrollingMovementMethod());
logoutConfirmationDialog = new LogoutDialogFragment();

((RestExplorerApp.RestExplorerSDKManager) RestExplorerApp.RestExplorerSDKManager.getInstance())
.addDevAction(this, "Export Credentials to Clipboard", this::exportCredentials);
}
Expand All @@ -140,15 +137,6 @@ public void onResume(RestClient client) {
this.client = client;
}

/**
* Returns the logout dialog fragment (used mainly by tests).
*
* @return Logout dialog fragment.
*/
public LogoutDialogFragment getLogoutConfirmationDialog() {
return logoutConfirmationDialog;
}

private void addTab(String tag, int titleId, int tabId) {
tabHost.addTab(tabHost.newTabSpec(tag).setIndicator(getString(titleId))
.setContent(tabId));
Expand Down
Loading

0 comments on commit ef91e91

Please sign in to comment.