Migrate to new Android Gradle plugin (#153)

* Migrate to new Android Gradle plugin

* Updated gradle to 4.5 and downgraded JaCoCo
pull/162/head
Jonas Rottmann 7 years ago committed by Mattia Iavarone
parent 5000caeb41
commit 0a54bf4543
  1. 4
      build.gradle
  2. 22
      cameraview/build.gradle
  3. 6
      demo/build.gradle
  4. 2
      gradle/wrapper/gradle-wrapper.properties

@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.1'
// https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
// https://www.theguardian.com/technology/developer-blog/2016/dec/06/how-to-publish-an-android-library-a-mysterious-conversation
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
@ -24,7 +24,7 @@ allprojects {
ext {
compileSdkVersion = 26
buildToolsVersion = "26.0.1"
buildToolsVersion = "26.0.2"
supportLibVersion = '26.1.0'
minSdkVersion = 15
targetSdkVersion = 26

@ -39,17 +39,17 @@ android {
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:rules:1.0.1'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile "com.android.support:exifinterface:$supportLibVersion"
compile "com.android.support:support-annotations:$supportLibVersion"
implementation "com.android.support:exifinterface:$supportLibVersion"
implementation "com.android.support:support-annotations:$supportLibVersion"
}
//endregion
@ -178,9 +178,7 @@ apply plugin: 'jacoco'
def reportsDirectory = "$buildDir/reports/"
jacoco {
// Using a different version might get 0 coverage reports.
// No time to investigate now.
toolVersion = "0.7.6.201602180812"
toolVersion = "0.7.4+"
reportsDir = file(reportsDirectory)
}

@ -21,7 +21,7 @@ android {
}
dependencies {
compile project(':cameraview')
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile "com.android.support:design:$supportLibVersion"
implementation project(':cameraview')
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:design:$supportLibVersion"
}

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip

Loading…
Cancel
Save