diff --git a/.travis.yml b/.travis.yml index 53ba2de..5cb906d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,5 +25,6 @@ android: - google-gdk-license-.+ script: - - ./gradlew clean check --profile + - ./gradlew clean check dependencyUpdate --profile - pandoc `ls -1rt build/reports/profile/profile-*.html | tail -n1` -t plain + - cat build/dependencyUpdates/report.txt diff --git a/build.gradle b/build.gradle index 7b8a18f..4d8c833 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +apply from: rootProject.file('versions-plugin.gradle') buildscript { repositories { @@ -22,8 +23,9 @@ buildscript { dependencies { classpath deps.android_gradle_plugin classpath deps.android_checkstyle_plugin - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' + classpath deps.android_maven_gradle_plugin + classpath deps.gradle_bintray_plugin + classpath deps.gradle_versions_plugin // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/checkstyle.gradle b/checkstyle.gradle index 858aac9..a71b0cb 100644 --- a/checkstyle.gradle +++ b/checkstyle.gradle @@ -20,5 +20,5 @@ checkstyle { ignoreFailures = false // Whether this task will ignore failures and continue running the build. configFile rootProject.file('config/checkstyle/checkstyle.xml') // The Checkstyle configuration file to use. - toolVersion = '8.5' // The version of Checkstyle you want to be used + toolVersion = '8.7' // The version of Checkstyle you want to be used } diff --git a/driver-sh1106/src/test/java/com/leinardi/androidthings/driver/sh1106/Sh1106Test.java b/driver-sh1106/src/test/java/com/leinardi/android/things/driver/sh1106/Sh1106Test.java similarity index 100% rename from driver-sh1106/src/test/java/com/leinardi/androidthings/driver/sh1106/Sh1106Test.java rename to driver-sh1106/src/test/java/com/leinardi/android/things/driver/sh1106/Sh1106Test.java diff --git a/versions-plugin.gradle b/versions-plugin.gradle new file mode 100644 index 0000000..cc630dd --- /dev/null +++ b/versions-plugin.gradle @@ -0,0 +1,30 @@ +/* + * Copyright 2018 Roberto Leinardi. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +apply plugin: 'com.github.ben-manes.versions' + +dependencyUpdates.resolutionStrategy = { + componentSelection { rules -> + rules.all { ComponentSelection selection -> + boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier -> + selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/ + } + if (rejected) { + selection.reject('Release candidate') + } + } + } +} diff --git a/versions.gradle b/versions.gradle index f11691f..74173ee 100644 --- a/versions.gradle +++ b/versions.gradle @@ -22,6 +22,7 @@ ext.deps = [:] def versions = [:] versions.android_checkstyle_plugin = "1.0.0" versions.android_gradle_plugin = "3.1.0-beta1" +versions.android_maven_gradle_plugin = "2.0" versions.androidthings = "0.6.1-devpreview" versions.apache_commons = "2.5" versions.arch = hasProperty("ARCH_VERSION") ? getProperty("ARCH_VERSION") : "1.0.0" @@ -32,14 +33,16 @@ versions.dagger = "2.13" versions.dexmaker = "2.2.0" versions.espresso = "3.0.1" versions.glide = "3.8.0" +versions.gradle_bintray_plugin = "1.8.0" +versions.gradle_versions_plugin = "0.17.0" versions.hamcrest = "1.3" versions.joystick = "1.1.0" versions.junit = "4.12" versions.kotlin = "1.2" -versions.mockito = "2.7.19" +versions.mockito = "2.13.3" versions.mockito_all = "1.10.19" versions.mockwebserver = "3.8.1" -versions.powermock = "1.6.6" +versions.powermock = "1.7.3" versions.paging = "1.0.0-alpha3" versions.play_services = "11.6.2" versions.retrofit = "2.3.0" @@ -137,7 +140,7 @@ deps.mockito = mockito def powermock = [:] powermock.module_junit4 = "org.powermock:powermock-module-junit4:$versions.powermock" -powermock.api_mockito = "org.powermock:powermock-api-mockito:$versions.powermock" +powermock.api_mockito = "org.powermock:powermock-api-mockito2:$versions.powermock" deps.powermock = powermock def kotlin = [:] @@ -148,10 +151,13 @@ deps.kotlin = kotlin deps.android_checkstyle_plugin = "com.leinardi.android:android-checkstyle-plugin:$versions.android_checkstyle_plugin" deps.android_gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin" +deps.android_maven_gradle_plugin = "com.github.dcendents:android-maven-gradle-plugin:$versions.android_maven_gradle_plugin" deps.androidthings = "com.google.android.things:androidthings:$versions.androidthings" deps.constraint_layout = "com.android.support.constraint:constraint-layout:$versions.constraint_layout" deps.dexmaker = "com.linkedin.dexmaker:dexmaker-mockito:$versions.dexmaker" deps.glide = "com.github.bumptech.glide:glide:$versions.glide" +deps.gradle_bintray_plugin = "com.jfrog.bintray.gradle:gradle-bintray-plugin:$versions.gradle_bintray_plugin" +deps.gradle_versions_plugin = "com.github.ben-manes:gradle-versions-plugin:$versions.gradle_versions_plugin" deps.hamcrest = "org.hamcrest:hamcrest-all:$versions.hamcrest" deps.joystick = "com.github.erz05:JoyStick:$versions.joystick" deps.junit = "junit:junit:$versions.junit"