Skip to content

Commit f1045c7

Browse files
author
Anastasia Senyushina
authored
Merge pull request #1514 from microsoft/develop
Version 4.1.1
2 parents 3193ab0 + dae6120 commit f1045c7

File tree

30 files changed

+739
-306
lines changed

30 files changed

+739
-306
lines changed

CHANGELOG.md

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

3+
## Version 4.1.1
4+
5+
### App Center Distribute Play
6+
7+
* **[Fix]** Fix `onNoReleaseAvailable` callback signature.
8+
9+
### App Center Distribute
10+
11+
* **[Fix]** Fix `NullPointerException` occurring when settings dialog was intended to be shown, but there is no foreground activity at that moment.
12+
* **[Fix]** Fix a crash when download manager application was disabled.
13+
* **[Fix]** Fix showing the title in the push notification while downloading a new release.
14+
15+
### App Center Crashes
16+
17+
* **[Fix]** Fix formatting of stack trace in the `ErrorReport`.
18+
* **[Fix]** Fix setting `userId` value in NDK crashes before sending.
19+
20+
___
21+
322
## Version 4.1.0
423

524
### App Center Crashes

apps/appcenter-post-clone.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
22
echo "Executing post clone script in `pwd`"
33
echo "dimension.dependency=$DIMENSION_DEPENDENCY" >> $APPCENTER_SOURCE_DIRECTORY/local.properties
4-
../scripts/set-ndk-version.sh
4+
../scripts/set-ndk-version.sh
5+
cd $APPCENTER_SOURCE_DIRECTORY && ./scripts/put-azure-credentials.sh $AZURE_USERNAME $AZURE_PASSWORD

apps/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def copyApkToProjectBuildTask(buildType) {
4141
if (file.exists()) {
4242
properties.load(file.newDataInputStream())
4343
}
44-
def defaultDependency = "jcenter"
44+
def defaultDependency = "mavenCentral"
4545
def dependency = properties.get("dimension.dependency", defaultDependency)
4646
if (dependency.isEmpty()) {
4747
dependency = defaultDependency

apps/sasquatch/build.gradle

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ android {
2727
dimension "dependency"
2828
applicationIdSuffix ".project"
2929
}
30-
jcenterDependency {
30+
mavenCentralDependency {
3131
dimension "dependency"
32-
applicationIdSuffix ".jcenter"
32+
applicationIdSuffix ".mavenCentral"
3333
}
3434
appCenter {
3535
dimension "distribute"
@@ -55,8 +55,28 @@ android {
5555
}
5656

5757
repositories {
58+
59+
// Load credentials from local.properties file.
60+
File propertiesFile = project.rootProject.file('local.properties')
61+
def AZURE_USERNAME = null
62+
def AZURE_PASSWORD = null
63+
64+
// Check that file exist.
65+
if (propertiesFile.exists()) {
66+
Properties properties = new Properties()
67+
properties.load(propertiesFile.newDataInputStream())
68+
69+
// Get properties. If properties aren't exist it returns null.
70+
AZURE_USERNAME = properties.getProperty('AZURE_USERNAME')
71+
AZURE_PASSWORD = properties.getProperty('AZURE_PASSWORD')
72+
}
73+
5874
maven {
59-
url "https://dl.bintray.com/vsappcenter/appcenter-snapshot"
75+
credentials {
76+
username = AZURE_USERNAME
77+
password = AZURE_PASSWORD
78+
}
79+
url "https://msmobilecenter.pkgs.visualstudio.com/_packaging/AppCenter/maven/v1/"
6080
}
6181
}
6282

@@ -70,16 +90,16 @@ dependencies {
7090
projectDependencyImplementation project(':sdk:appcenter-crashes')
7191

7292
def appCenterSdkVersion = "4.1.0"
73-
jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
74-
jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
93+
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
94+
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
7595

7696
def taskRequests = getGradle().getStartParameter().getTaskRequests().toString()
7797
if (taskRequests.contains("GooglePlay")) {
7898
projectDependencyImplementation project(':sdk:appcenter-distribute-play')
79-
jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-distribute-play:${appCenterSdkVersion}"
99+
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-distribute-play:${appCenterSdkVersion}"
80100
} else {
81101
projectDependencyImplementation project(':sdk:appcenter-distribute')
82-
jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}"
102+
mavenCentralDependencyImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}"
83103
}
84104

85105
androidTestImplementation 'com.android.support.test:rules:1.0.2'

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.microsoft.appcenter.crashes.CrashesPrivateHelper;
2424
import com.microsoft.appcenter.crashes.model.ErrorReport;
2525
import com.microsoft.appcenter.crashes.utils.ErrorLogHelper;
26+
import com.microsoft.appcenter.sasquatch.CrashTestHelper;
2627
import com.microsoft.appcenter.sasquatch.R;
2728
import com.microsoft.appcenter.sasquatch.listeners.SasquatchCrashesListener;
2829
import com.microsoft.appcenter.utils.storage.SharedPreferencesManager;
@@ -72,10 +73,10 @@ public class CrashesTest {
7273
private Context mContext;
7374

7475
private static Matcher<Object> withCrashTitle(@StringRes final int titleId) {
75-
return new BoundedMatcher<Object, CrashActivity.Crash>(CrashActivity.Crash.class) {
76+
return new BoundedMatcher<Object, CrashTestHelper.Crash>(CrashTestHelper.Crash.class) {
7677

7778
@Override
78-
public boolean matchesSafely(CrashActivity.Crash map) {
79+
public boolean matchesSafely(CrashTestHelper.Crash map) {
7980
return map.title == titleId;
8081
}
8182

@@ -183,7 +184,7 @@ private void crashTest(@StringRes int titleId) throws InterruptedException {
183184
new Date().getTime() - errorReport.getAppErrorTime().getTime(),
184185
lessThan(10000L));
185186
assertNotNull(errorReport.getDevice());
186-
assertEquals(getStackTraceString(failureHandler.uncaughtException), errorReport.getStackTrace());
187+
assertTrue(errorReport.getStackTrace().contains(failureHandler.uncaughtException.getMessage()));
187188

188189
/* Send report. */
189190
waitFor(onView(withText(R.string.crash_confirmation_dialog_send_button))
@@ -202,7 +203,7 @@ private void crashTest(@StringRes int titleId) throws InterruptedException {
202203
}
203204

204205
private ViewInteraction onCrash(@StringRes int titleId) {
205-
return onData(allOf(instanceOf(CrashActivity.Crash.class), withCrashTitle(titleId)))
206+
return onData(allOf(instanceOf(CrashTestHelper.Crash.class), withCrashTitle(titleId)))
206207
.perform();
207208
}
208209

build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ apply from: 'publish.gradle'
1111
buildscript {
1212
repositories {
1313
google()
14-
jcenter()
14+
mavenCentral()
1515
maven {
1616
url 'https://plugins.gradle.org/m2/'
1717
}
1818
}
1919

2020
dependencies {
2121
classpath 'com.android.tools.build:gradle:4.0.1'
22-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
2322
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
2423
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
2524
}
@@ -28,7 +27,14 @@ buildscript {
2827
allprojects {
2928
repositories {
3029
google()
31-
jcenter()
30+
mavenCentral()
31+
jcenter {
32+
content {
33+
34+
// https://youtrack.jetbrains.com/issue/IDEA-261387
35+
includeModule("org.jetbrains.trove4j", "trove4j")
36+
}
37+
}
3238
}
3339

3440
tasks.withType(JavaCompile) {

publish.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ ext {
1717
properties.load(file.newDataInputStream())
1818
}
1919

20-
bintrayUser = properties.getProperty("bintray.user")
21-
bintrayKey = properties.getProperty("bintray.key")
22-
bintrayUserOrg = properties.getProperty("bintray.user.org")
23-
bintrayRepo = properties.getProperty("bintray.repo")
20+
mavenUser = properties.getProperty("maven.user")
21+
mavenKey = properties.getProperty("maven.key")
22+
mavenRepoUrl = properties.getProperty("maven.repoUrl")
23+
mavenSigningKeyId = properties.getProperty("maven.signingKeyId")
24+
mavenPublicKeyPassword = properties.getProperty("maven.publicKeyPassword")
25+
mavenSecretKeyPath = properties.getProperty("maven.secretKeyPath")
2426

2527
licenseName = 'The MIT License (MIT)'
2628
licenseSite = 'https://opensource.org/licenses/MIT'
@@ -29,4 +31,4 @@ ext {
2931
developerId = 'microsoft'
3032
developerName = 'Microsoft'
3133
developerEmail = 'appcentersdk@microsoft.com'
32-
}
34+
}

scripts/add-snapshot-prefix.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# Description: Add a `SNAPSHOT` prefix for `versionName` in `versions.gradle`.
4+
# Usage: ./scripts/add-snapshot-prefix.sh
5+
6+
# Compute new version
7+
gradleVersion=`egrep "versionName = '(.*)'" *.gradle | sed -E "s/^.*versionName = '(.*)'.*$/\1/"`
8+
baseGradleVersion=`echo $gradleVersion | cut -d'-' -f 1`
9+
newVersion=$baseGradleVersion-"SNAPSHOT"
10+
11+
# Replace version in the file
12+
sed -E -i '' "s#(versionName = ')(.*)'#\1$newVersion'#" *.gradle
13+
# Print version on build logs
14+
grep "versionName = '" *.gradle

scripts/increment-bintray-build-number.sh

Lines changed: 0 additions & 54 deletions
This file was deleted.

scripts/put-azure-credentials.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
cat >> local.properties << EOL
3+
AZURE_USERNAME=${1:-$AZURE_USERNAME}
4+
AZURE_PASSWORD=${2:-$AZURE_PASSWORD}
5+
EOL

0 commit comments

Comments
 (0)