Skip to content

Commit a94e99c

Browse files
author
Anastasia Senyushina
authored
Merge pull request #1537 from microsoft/develop
Version 4.2.0
2 parents 1fd81d0 + e84a25f commit a94e99c

File tree

152 files changed

+963
-442
lines changed

Some content is hidden

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

152 files changed

+963
-442
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414

1515
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
16-
runs-on: windows-latest
16+
runs-on: macos-latest
1717

1818
steps:
1919
- name: Checkout repository
@@ -38,6 +38,7 @@ jobs:
3838
3939
- run: |
4040
echo "Assemble modules"
41+
./scripts/add-gradle-property.sh
4142
./gradlew :sdk:appcenter:assemble :sdk:appcenter-analytics:assemble :sdk:appcenter-crashes:assemble :sdk:appcenter-distribute:assemble :sdk:appcenter-distribute-play:assemble
4243
4344
- name: Perform CodeQL Analysis

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# App Center SDK for Android Change Log
22

3+
## Version 4.2.0
4+
5+
### App Center
6+
7+
* **[Fix]** Remove old support libraries for compatibility with apps without enabled Jetifier tool.
8+
* **[Feature]** Add a `AppCenter.setNetworkRequestsAllowed(bool)` API to block any network requests without disabling the SDK.
9+
10+
### App Center Distribute
11+
12+
* **[Fix]** Fix crash during downloading a new release when `minifyEnabled` settings is `true`.
13+
* **[Fix]** Add a missing tag `android:exported` to the manifest required for Android 12.
14+
15+
___
16+
317
## Version 4.1.1
418

519
### App Center Distribute Play

apps/sasquatch/build.gradle

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ evaluationDependsOn(':apps')
1111

1212
android {
1313

14+
compileSdkVersion 'android-S'
1415
flavorDimensions "dependency", "distribute"
1516

1617
defaultConfig {
@@ -20,6 +21,7 @@ android {
2021
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
2122
}
2223
}
24+
targetSdkVersion "30"
2325
}
2426

2527
productFlavors {
@@ -81,10 +83,9 @@ repositories {
8183
}
8284

8385
dependencies {
84-
implementation "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"
85-
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
86-
implementation "com.android.support:customtabs:${rootProject.ext.supportLibVersion}"
87-
implementation "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}"
86+
implementation "androidx.appcompat:appcompat:1.0.2"
87+
implementation "androidx.browser:browser:1.0.0"
88+
implementation "androidx.recyclerview:recyclerview:1.1.0"
8889

8990
projectDependencyImplementation project(':sdk:appcenter-analytics')
9091
projectDependencyImplementation project(':sdk:appcenter-crashes')
@@ -102,7 +103,7 @@ dependencies {
102103
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}"
103104
}
104105

105-
androidTestImplementation 'com.android.support.test:rules:1.0.2'
106-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
107-
implementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.2'
106+
androidTestImplementation 'androidx.test:rules:1.2.0'
107+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
108+
implementation 'androidx.test.espresso:espresso-idling-resource:3.1.0'
108109
}

apps/sasquatch/src/androidTest/java/com/microsoft/appcenter/sasquatch/activities/AnalyticsTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
package com.microsoft.appcenter.sasquatch.activities;
77

88

9-
import android.support.test.espresso.IdlingRegistry;
10-
import android.support.test.rule.ActivityTestRule;
9+
import androidx.test.espresso.IdlingRegistry;
10+
import androidx.test.rule.ActivityTestRule;
1111

1212
import com.microsoft.appcenter.sasquatch.R;
1313
import com.microsoft.appcenter.sasquatch.listeners.SasquatchAnalyticsListener;
@@ -17,16 +17,16 @@
1717
import org.junit.Rule;
1818
import org.junit.Test;
1919

20-
import static android.support.test.espresso.Espresso.onView;
21-
import static android.support.test.espresso.action.ViewActions.click;
22-
import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
23-
import static android.support.test.espresso.action.ViewActions.replaceText;
24-
import static android.support.test.espresso.assertion.ViewAssertions.matches;
25-
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
26-
import static android.support.test.espresso.matcher.ViewMatchers.isRoot;
27-
import static android.support.test.espresso.matcher.ViewMatchers.withChild;
28-
import static android.support.test.espresso.matcher.ViewMatchers.withId;
29-
import static android.support.test.espresso.matcher.ViewMatchers.withText;
20+
import static androidx.test.espresso.Espresso.onView;
21+
import static androidx.test.espresso.action.ViewActions.click;
22+
import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard;
23+
import static androidx.test.espresso.action.ViewActions.replaceText;
24+
import static androidx.test.espresso.assertion.ViewAssertions.matches;
25+
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
26+
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
27+
import static androidx.test.espresso.matcher.ViewMatchers.withChild;
28+
import static androidx.test.espresso.matcher.ViewMatchers.withId;
29+
import static androidx.test.espresso.matcher.ViewMatchers.withText;
3030
import static com.microsoft.appcenter.sasquatch.activities.utils.EspressoUtils.CHECK_DELAY;
3131
import static com.microsoft.appcenter.sasquatch.activities.utils.EspressoUtils.TOAST_DELAY;
3232
import static com.microsoft.appcenter.sasquatch.activities.utils.EspressoUtils.onToast;

apps/sasquatch/src/androidTest/java/com/microsoft/appcenter/sasquatch/activities/CrashesTest.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
import android.content.Context;
99
import android.content.Intent;
10-
import android.support.annotation.StringRes;
11-
import android.support.test.espresso.EspressoException;
12-
import android.support.test.espresso.FailureHandler;
13-
import android.support.test.espresso.IdlingRegistry;
14-
import android.support.test.espresso.ViewInteraction;
15-
import android.support.test.espresso.matcher.BoundedMatcher;
16-
import android.support.test.rule.ActivityTestRule;
17-
import android.support.v4.app.ActivityCompat;
10+
import androidx.annotation.StringRes;
11+
import androidx.core.app.ActivityCompat;
12+
import androidx.test.espresso.EspressoException;
13+
import androidx.test.espresso.FailureHandler;
14+
import androidx.test.espresso.IdlingRegistry;
15+
import androidx.test.espresso.ViewInteraction;
16+
import androidx.test.espresso.matcher.BoundedMatcher;
17+
import androidx.test.rule.ActivityTestRule;
1818
import android.view.View;
1919

2020
import com.microsoft.appcenter.AppCenter;
@@ -39,16 +39,16 @@
3939
import java.lang.reflect.Method;
4040
import java.util.Date;
4141

42-
import static android.support.test.InstrumentationRegistry.getInstrumentation;
43-
import static android.support.test.espresso.Espresso.onData;
44-
import static android.support.test.espresso.Espresso.onView;
45-
import static android.support.test.espresso.action.ViewActions.click;
46-
import static android.support.test.espresso.assertion.ViewAssertions.matches;
47-
import static android.support.test.espresso.matcher.RootMatchers.isDialog;
48-
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
49-
import static android.support.test.espresso.matcher.ViewMatchers.isRoot;
50-
import static android.support.test.espresso.matcher.ViewMatchers.withChild;
51-
import static android.support.test.espresso.matcher.ViewMatchers.withText;
42+
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
43+
import static androidx.test.espresso.Espresso.onData;
44+
import static androidx.test.espresso.Espresso.onView;
45+
import static androidx.test.espresso.action.ViewActions.click;
46+
import static androidx.test.espresso.assertion.ViewAssertions.matches;
47+
import static androidx.test.espresso.matcher.RootMatchers.isDialog;
48+
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
49+
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
50+
import static androidx.test.espresso.matcher.ViewMatchers.withChild;
51+
import static androidx.test.espresso.matcher.ViewMatchers.withText;
5252
import static android.util.Log.getStackTraceString;
5353
import static com.microsoft.appcenter.sasquatch.activities.utils.EspressoUtils.CHECK_DELAY;
5454
import static com.microsoft.appcenter.sasquatch.activities.utils.EspressoUtils.TOAST_DELAY;

apps/sasquatch/src/androidTest/java/com/microsoft/appcenter/sasquatch/activities/DeviceInfoActivityTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
package com.microsoft.appcenter.sasquatch.activities;
77

88

9-
import android.support.test.espresso.DataInteraction;
10-
import android.support.test.espresso.matcher.BoundedMatcher;
11-
import android.support.test.rule.ActivityTestRule;
9+
import androidx.test.espresso.DataInteraction;
10+
import androidx.test.espresso.matcher.BoundedMatcher;
11+
import androidx.test.rule.ActivityTestRule;
1212

1313
import org.hamcrest.Description;
1414
import org.hamcrest.Matcher;
1515
import org.junit.Rule;
1616
import org.junit.Test;
1717

18-
import static android.support.test.espresso.Espresso.onData;
19-
import static android.support.test.espresso.assertion.ViewAssertions.matches;
18+
import static androidx.test.espresso.Espresso.onData;
19+
import static androidx.test.espresso.assertion.ViewAssertions.matches;
2020
import static org.hamcrest.Matchers.allOf;
2121
import static org.hamcrest.Matchers.anything;
2222
import static org.hamcrest.Matchers.equalTo;

apps/sasquatch/src/androidTest/java/com/microsoft/appcenter/sasquatch/activities/SettingsActivityTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
import android.content.Context;
99
import android.content.Intent;
10-
import android.support.test.espresso.DataInteraction;
11-
import android.support.test.rule.ActivityTestRule;
10+
import androidx.test.espresso.DataInteraction;
11+
import androidx.test.rule.ActivityTestRule;
1212

1313
import com.microsoft.appcenter.AppCenter;
1414
import com.microsoft.appcenter.analytics.Analytics;
@@ -22,15 +22,15 @@
2222
import org.junit.Rule;
2323
import org.junit.Test;
2424

25-
import static android.support.test.InstrumentationRegistry.getInstrumentation;
26-
import static android.support.test.espresso.Espresso.onData;
27-
import static android.support.test.espresso.Espresso.onView;
28-
import static android.support.test.espresso.action.ViewActions.click;
29-
import static android.support.test.espresso.assertion.ViewAssertions.matches;
30-
import static android.support.test.espresso.matcher.PreferenceMatchers.withKey;
31-
import static android.support.test.espresso.matcher.ViewMatchers.isChecked;
32-
import static android.support.test.espresso.matcher.ViewMatchers.isNotChecked;
33-
import static android.support.test.espresso.matcher.ViewMatchers.withId;
25+
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
26+
import static androidx.test.espresso.Espresso.onData;
27+
import static androidx.test.espresso.Espresso.onView;
28+
import static androidx.test.espresso.action.ViewActions.click;
29+
import static androidx.test.espresso.assertion.ViewAssertions.matches;
30+
import static androidx.test.espresso.matcher.PreferenceMatchers.withKey;
31+
import static androidx.test.espresso.matcher.ViewMatchers.isChecked;
32+
import static androidx.test.espresso.matcher.ViewMatchers.isNotChecked;
33+
import static androidx.test.espresso.matcher.ViewMatchers.withId;
3434

3535
@SuppressWarnings("unused")
3636
public class SettingsActivityTest {

apps/sasquatch/src/androidTest/java/com/microsoft/appcenter/sasquatch/activities/utils/EspressoUtils.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66
package com.microsoft.appcenter.sasquatch.activities.utils;
77

88
import android.app.Activity;
9-
import android.support.annotation.StringRes;
10-
import android.support.test.espresso.NoMatchingRootException;
11-
import android.support.test.espresso.NoMatchingViewException;
12-
import android.support.test.espresso.UiController;
13-
import android.support.test.espresso.ViewAction;
14-
import android.support.test.espresso.ViewAssertion;
15-
import android.support.test.espresso.ViewInteraction;
16-
import android.support.test.espresso.matcher.BoundedMatcher;
9+
import androidx.annotation.StringRes;
10+
import androidx.test.espresso.NoMatchingRootException;
11+
import androidx.test.espresso.NoMatchingViewException;
12+
import androidx.test.espresso.UiController;
13+
import androidx.test.espresso.ViewAction;
14+
import androidx.test.espresso.ViewAssertion;
15+
import androidx.test.espresso.ViewInteraction;
16+
import androidx.test.espresso.matcher.BoundedMatcher;
1717
import android.view.View;
1818
import android.widget.TextView;
1919

2020
import org.hamcrest.Description;
2121
import org.hamcrest.Matcher;
2222
import org.junit.Assert;
2323

24-
import static android.support.test.espresso.Espresso.onView;
25-
import static android.support.test.espresso.matcher.RootMatchers.withDecorView;
26-
import static android.support.test.espresso.matcher.ViewMatchers.isRoot;
24+
import static androidx.test.espresso.Espresso.onView;
25+
import static androidx.test.espresso.matcher.RootMatchers.withDecorView;
26+
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
2727
import static org.hamcrest.Matchers.is;
2828
import static org.hamcrest.Matchers.not;
2929

apps/sasquatch/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
tools:targetApi="n">
2020
<activity
2121
android:name=".activities.MainActivity"
22-
android:launchMode="singleTop">
22+
android:launchMode="singleTop"
23+
android:exported="true">
2324
<intent-filter>
2425
<action android:name="android.intent.action.MAIN" />
2526

apps/sasquatch/src/main/java/com/microsoft/appcenter/sasquatch/activities/AuthenticationProviderActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
import android.content.Intent;
99
import android.os.Bundle;
10-
import android.support.annotation.Nullable;
11-
import android.support.v7.app.AppCompatActivity;
10+
import androidx.annotation.Nullable;
11+
import androidx.appcompat.app.AppCompatActivity;
12+
1213
import android.view.View;
1314
import android.widget.ListView;
1415

0 commit comments

Comments
 (0)