Skip to content

Commit

Permalink
Merge pull request #934 from Microsoft/fix/compatibility-with-as-3.3
Browse files Browse the repository at this point in the history
Fix compatibility with Android Studio 3.3
  • Loading branch information
guperrot committed Jan 25, 2019
2 parents ce13220 + 9f3dd25 commit bfd3e7d
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Please make sure the following is done when submitting a pull request:

1. Fork the repository and create your branch from `develop`.
1. Run `git submodule update --init --recursive` before opening the solution if you don't want errors in the test application.
1. Use Android Studio 3.3 to edit and compile the SDK.
1. To run the test app that uses project references to the SDK sources:
1. Select build variant `projectDependencyFirebaseDebug` before hitting gradle sync.
1. Disable `Instant run` in Android Studio settings before running.
1. To run unit tests within Android Studio, disable `Configure on demand` in Android Studio `Compiler` settings.
1. Make sure all tests have passed and your code is covered: run `gradlew coverageReport` command to generate report.
1. Make sure that there are no lint errors: run `gradlew assemble lint` command.
1. If your change includes a fix or feature related to the changelog of the next release, you have to update the **CHANGELOG.md**.
Expand Down
10 changes: 5 additions & 5 deletions apps/sasquatch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ repositories {
}

dependencies {
implementation "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'

projectDependencyImplementation project(':sdk:appcenter-analytics')
projectDependencyImplementation project(':sdk:appcenter-crashes')
Expand All @@ -76,9 +76,9 @@ dependencies {
jcenterDependencyImplementation "com.microsoft.appcenter:appcenter-push:${appCenterSdkVersion}"

/* Force usage this version of support annotations to avoid conflict. */
androidTestImplementation "com.android.support:support-annotations:${rootProject.ext.supportLibVersion}"
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.1'
androidTestImplementation "com.android.support:support-annotations:28.0.0"
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.2'
}

// We are interested in excluding the plugin only for the vanilla sasquatch build variant.
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
}
}
Expand Down
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Oct 08 07:49:51 MSK 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
2 changes: 1 addition & 1 deletion scripts/publish-github-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GITHUB_ACCESS_TOKEN=${1:-$GITHUB_ACCESS_TOKEN}
GITHUB_API_URL_TEMPLATE="https://%s.github.com/repos/%s/%s?access_token=%s%s"
GITHUB_API_HOST="api"
GITHUB_UPLOAD_HOST="uploads"
BINARY_FILE_FILTER="*release.aar"
BINARY_FILE_FILTER="*.aar"
JQ_COMMAND=jq
PUBLISH_VERSION="$(grep "versionName = '" versions.gradle | awk -F "[']" '{print $2}')"

Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-storage-account.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

AZURE_STORAGE_ACCESS_KEY=${1:-$AZURE_STORAGE_ACCESS_KEY}

BINARY_FILE_FILTER="*release.aar"
BINARY_FILE_FILTER="*.aar"
PUBLISH_VERSION="$(grep "versionName = '" *.gradle | awk -F "[']" '{print $2}')"
ARCHIVE=AppCenter-SDK-Android-${PUBLISH_VERSION}
ZIP_FILE=$ARCHIVE.zip
Expand Down
17 changes: 10 additions & 7 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ subprojects {
androidTestImplementation 'com.crittercism.dexmaker:dexmaker-mockito:1.4'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation ("com.android.support:support-annotations:${ext.supportLibVersion}") {
force = true
}
androidTestImplementation project(':test')
}

Expand All @@ -90,14 +93,14 @@ subprojects {
}

def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
sourceDirectories = files(["$projectDir/src/main/java"])
classDirectories = files([
sourceDirectories.from = files(["$projectDir/src/main/java"])
classDirectories.from = files([
fileTree(dir: "$buildDir/intermediates/classes/debug", excludes: fileFilter),
fileTree(dir: "$buildDir/intermediates/javac/debug/compileDebugJavaWithJavac/classes", excludes: fileFilter)
])
executionData = fileTree(dir: buildDir, includes: [
executionData.from = fileTree(dir: buildDir, includes: [
'jacoco/testDebugUnitTest.exec',
'outputs/code-coverage/connected/*coverage.ec'
'outputs/code_coverage/debugAndroidTest/connected/*coverage.ec'
])
}

Expand Down Expand Up @@ -214,11 +217,11 @@ task coverageReport(type: JacocoReport, dependsOn: subprojects.coverageReport) {
def coverageReports = subprojects.coverageReport.findAll { !it.project.name.contains("rum") }

//noinspection GroovyAssignabilityCheck
sourceDirectories = files(coverageReports.sourceDirectories)
sourceDirectories.from = files(coverageReports.sourceDirectories)
//noinspection GroovyAssignabilityCheck
classDirectories = files(coverageReports.classDirectories)
classDirectories.from = files(coverageReports.classDirectories)
//noinspection GroovyAssignabilityCheck
executionData = files(coverageReports.executionData)
executionData.from = files(coverageReports.executionData)
}

apply plugin: 'com.github.kt3k.coveralls'
Expand Down
4 changes: 3 additions & 1 deletion versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ ext {
minSdkVersion = 16
targetSdkVersion = 28
compileSdkVersion = 28
supportLibVersion = '28.0.0'

// We have to use this version to avoid version conflict with firebase-core (support-v4:26.1.0).
supportLibVersion = '26.1.0'
}

0 comments on commit bfd3e7d

Please sign in to comment.