diff --git a/.travis.yml b/.travis.yml index 0a23ff0..b040770 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,9 +35,9 @@ script: - set -o pipefail - ./gradlew clean build check --profile --continue 2>&1 | tee build.log - set +o pipefail -# - | -# if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then -# ./gradlew violationCommentsToGitHub -DGITHUB_PULLREQUESTID=$TRAVIS_PULL_REQUEST -DGITHUB_OAUTH2TOKEN=$GITHUB_OAUTH2TOKEN --info -# fi + # - | + # if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + # ./gradlew violationCommentsToGitHub -DGITHUB_PULLREQUESTID=$TRAVIS_PULL_REQUEST -DGITHUB_OAUTH2TOKEN=$GITHUB_OAUTH2TOKEN --info + # fi - pandoc `ls -1rt build/reports/profile/profile-*.html | tail -n1` -t plain - - ./gradlew dependencyUpdate # I must run this separately due to issues with the support library resolutionStrategy + - ./gradlew dependencyUpdate diff --git a/build.gradle b/build.gradle index 5122745..2271b26 100644 --- a/build.gradle +++ b/build.gradle @@ -37,18 +37,6 @@ allprojects { } } -subprojects { - project.configurations.all { - resolutionStrategy.eachDependency { details -> - if (details.requested.group == 'com.android.support' - && !details.requested.name.contains('multidex') - && !gradle.startParameter.taskNames.contains('dependencyUpdates')) { - details.useVersion versions.support - } - } - } -} - task clean(type: Delete) { delete rootProject.buildDir } diff --git a/dependencies.gradle b/dependencies.gradle index 690015d..8cdbf50 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -20,19 +20,19 @@ **/ ext.deps = [:] def versions = [:] +versions.androidthings = "1.0" versions.android_checkstyle_plugin = "1.1.0" versions.android_gradle_plugin = "3.4.1" versions.android_maven_gradle_plugin = "2.1" -versions.androidthings = "1.0" versions.gradle_bintray_plugin = "1.8.0" versions.gradle_versions_plugin = "0.21.0" versions.powermock = "2.0.2" -versions.support = "27.1.1" +versions.androidx_annotations = "1.0.0" ext.versions = versions def build_versions = [:] -build_versions.min_sdk = 26 -build_versions.target_sdk = 27 +build_versions.min_sdk = 28 +build_versions.target_sdk = 28 build_versions.java_version = JavaVersion.VERSION_1_7 build_versions.version_code = 'git rev-list --count HEAD'.execute().text.trim() as int ext.build_versions = build_versions diff --git a/driver-ds3231-receiver/build.gradle b/driver-ds3231-receiver/build.gradle index 450a489..3174ed8 100644 --- a/driver-ds3231-receiver/build.gradle +++ b/driver-ds3231-receiver/build.gradle @@ -46,6 +46,6 @@ android { dependencies { compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" implementation 'com.leinardi.android.things:driver-ds3231:1.0' } diff --git a/driver-ds3231/build.gradle b/driver-ds3231/build.gradle index b543255..53fcde3 100644 --- a/driver-ds3231/build.gradle +++ b/driver-ds3231/build.gradle @@ -47,7 +47,7 @@ android { dependencies { compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" testImplementation "com.google.android.things:androidthings:$versions.androidthings" testImplementation "org.powermock:powermock-module-junit4:$versions.powermock" diff --git a/driver-ds3231/src/main/java/com/leinardi/android/things/driver/ds3231/Ds3231.java b/driver-ds3231/src/main/java/com/leinardi/android/things/driver/ds3231/Ds3231.java index 64d89f4..b1c3e3b 100644 --- a/driver-ds3231/src/main/java/com/leinardi/android/things/driver/ds3231/Ds3231.java +++ b/driver-ds3231/src/main/java/com/leinardi/android/things/driver/ds3231/Ds3231.java @@ -16,10 +16,10 @@ package com.leinardi.android.things.driver.ds3231; -import android.support.annotation.IntDef; -import android.support.annotation.Nullable; import android.util.Log; +import androidx.annotation.IntDef; +import androidx.annotation.Nullable; import com.google.android.things.pio.I2cDevice; import com.google.android.things.pio.PeripheralManager; diff --git a/driver-epaperdriverhat/build.gradle b/driver-epaperdriverhat/build.gradle index dfc5e38..c758c95 100644 --- a/driver-epaperdriverhat/build.gradle +++ b/driver-epaperdriverhat/build.gradle @@ -46,5 +46,5 @@ android { dependencies { compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" } diff --git a/driver-hcsr04/build.gradle b/driver-hcsr04/build.gradle index dfc5e38..c758c95 100644 --- a/driver-hcsr04/build.gradle +++ b/driver-hcsr04/build.gradle @@ -46,5 +46,5 @@ android { dependencies { compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" } diff --git a/driver-hd44780/build.gradle b/driver-hd44780/build.gradle index bb2e364..937f1c8 100644 --- a/driver-hd44780/build.gradle +++ b/driver-hd44780/build.gradle @@ -46,7 +46,7 @@ android { dependencies { compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" testImplementation "com.google.android.things:androidthings:$versions.androidthings" testImplementation "org.powermock:powermock-module-junit4:$versions.powermock" diff --git a/driver-hd44780/src/main/java/com/leinardi/android/things/driver/hd44780/Hd44780.java b/driver-hd44780/src/main/java/com/leinardi/android/things/driver/hd44780/Hd44780.java index 4be9203..c454ddd 100644 --- a/driver-hd44780/src/main/java/com/leinardi/android/things/driver/hd44780/Hd44780.java +++ b/driver-hd44780/src/main/java/com/leinardi/android/things/driver/hd44780/Hd44780.java @@ -16,9 +16,9 @@ package com.leinardi.android.things.driver.hd44780; -import android.support.annotation.IntDef; import android.util.Log; +import androidx.annotation.IntDef; import com.google.android.things.pio.I2cDevice; import com.google.android.things.pio.PeripheralManager; diff --git a/driver-lsm9ds1/build.gradle b/driver-lsm9ds1/build.gradle index bb2e364..937f1c8 100644 --- a/driver-lsm9ds1/build.gradle +++ b/driver-lsm9ds1/build.gradle @@ -46,7 +46,7 @@ android { dependencies { compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" testImplementation "com.google.android.things:androidthings:$versions.androidthings" testImplementation "org.powermock:powermock-module-junit4:$versions.powermock" diff --git a/driver-lsm9ds1/src/main/java/com/leinardi/android/things/driver/lsm9ds1/Lsm9ds1.java b/driver-lsm9ds1/src/main/java/com/leinardi/android/things/driver/lsm9ds1/Lsm9ds1.java index 1e10ca3..caa6178 100644 --- a/driver-lsm9ds1/src/main/java/com/leinardi/android/things/driver/lsm9ds1/Lsm9ds1.java +++ b/driver-lsm9ds1/src/main/java/com/leinardi/android/things/driver/lsm9ds1/Lsm9ds1.java @@ -18,8 +18,8 @@ import android.hardware.SensorManager; import android.os.SystemClock; -import android.support.annotation.IntDef; +import androidx.annotation.IntDef; import com.google.android.things.pio.I2cDevice; import com.google.android.things.pio.PeripheralManager; @@ -58,21 +58,17 @@ import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerGain.MAG_GAIN_16GAUSS; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerGain.MAG_GAIN_4GAUSS; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerGain.MAG_GAIN_8GAUSS; -import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerSystemOperatingMode - .MAG_CONTINUOUS_CONVERSION; +import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerSystemOperatingMode.MAG_CONTINUOUS_CONVERSION; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerSystemOperatingMode.MAG_POWER_DOWN; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerSystemOperatingMode.MAG_SINGLE_CONVERSION; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerXYOperatingMode.MAG_XY_OM_HIGH_PERFORMANCE; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerXYOperatingMode.MAG_XY_OM_LOW_POWER; -import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerXYOperatingMode - .MAG_XY_OM_MEDIUM_PERFORMANCE; -import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerXYOperatingMode - .MAG_XY_OM_ULTRA_HIGH_PERFORMANCE; +import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerXYOperatingMode.MAG_XY_OM_MEDIUM_PERFORMANCE; +import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerXYOperatingMode.MAG_XY_OM_ULTRA_HIGH_PERFORMANCE; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerZOperatingMode.MAG_Z_OM_HIGH_PERFORMANCE; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerZOperatingMode.MAG_Z_OM_LOW_POWER; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerZOperatingMode.MAG_Z_OM_MEDIUM_PERFORMANCE; -import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerZOperatingMode - .MAG_Z_OM_ULTRA_HIGH_PERFORMANCE; +import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerZOperatingMode.MAG_Z_OM_ULTRA_HIGH_PERFORMANCE; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.SensorType.SENSOR_MAG; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.SensorType.SENSOR_XG; diff --git a/driver-lsm9ds1/src/main/java/com/leinardi/android/things/driver/lsm9ds1/Lsm9ds1SensorDriver.java b/driver-lsm9ds1/src/main/java/com/leinardi/android/things/driver/lsm9ds1/Lsm9ds1SensorDriver.java index b584b0e..2faa06f 100644 --- a/driver-lsm9ds1/src/main/java/com/leinardi/android/things/driver/lsm9ds1/Lsm9ds1SensorDriver.java +++ b/driver-lsm9ds1/src/main/java/com/leinardi/android/things/driver/lsm9ds1/Lsm9ds1SensorDriver.java @@ -28,8 +28,7 @@ import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.AccelGyroOutputDataRate.ODR_952HZ; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.AccelGyroOutputDataRate.ODR_POWER_DOWN; -import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerSystemOperatingMode - .MAG_CONTINUOUS_CONVERSION; +import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerSystemOperatingMode.MAG_CONTINUOUS_CONVERSION; import static com.leinardi.android.things.driver.lsm9ds1.Lsm9ds1.MagnetometerSystemOperatingMode.MAG_POWER_DOWN; public class Lsm9ds1SensorDriver implements AutoCloseable { diff --git a/driver-sh1106/build.gradle b/driver-sh1106/build.gradle index bb2e364..937f1c8 100644 --- a/driver-sh1106/build.gradle +++ b/driver-sh1106/build.gradle @@ -46,7 +46,7 @@ android { dependencies { compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" testImplementation "com.google.android.things:androidthings:$versions.androidthings" testImplementation "org.powermock:powermock-module-junit4:$versions.powermock" diff --git a/driver-tsl256x/build.gradle b/driver-tsl256x/build.gradle index bb2e364..937f1c8 100644 --- a/driver-tsl256x/build.gradle +++ b/driver-tsl256x/build.gradle @@ -46,7 +46,7 @@ android { dependencies { compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" testImplementation "com.google.android.things:androidthings:$versions.androidthings" testImplementation "org.powermock:powermock-module-junit4:$versions.powermock" diff --git a/driver-tsl256x/src/main/java/com/leinardi/android/things/driver/tsl256x/Tsl256x.java b/driver-tsl256x/src/main/java/com/leinardi/android/things/driver/tsl256x/Tsl256x.java index 9abfff5..ff74770 100644 --- a/driver-tsl256x/src/main/java/com/leinardi/android/things/driver/tsl256x/Tsl256x.java +++ b/driver-tsl256x/src/main/java/com/leinardi/android/things/driver/tsl256x/Tsl256x.java @@ -17,9 +17,9 @@ package com.leinardi.android.things.driver.tsl256x; import android.os.SystemClock; -import android.support.annotation.IntDef; import android.util.Log; +import androidx.annotation.IntDef; import com.google.android.things.pio.I2cDevice; import com.google.android.things.pio.PeripheralManager; diff --git a/gradle.properties b/gradle.properties index fd59fb1..6703e6a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,5 +15,16 @@ # KEYSTORE_PATH=../keystore/release.keystore KEYSTORE_PROPERTIES_PATH=../keystore/keystore.properties - -org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m -XX:MaxMetaspaceSize=512m +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true diff --git a/sample-ds3231/build.gradle b/sample-ds3231/build.gradle index ccd91b8..51fed5c 100644 --- a/sample-ds3231/build.gradle +++ b/sample-ds3231/build.gradle @@ -47,7 +47,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" implementation project(':driver-ds3231') // Uncomment to automatic persist on reboot/poweroff the system wall clock time // implementation project(':driver-ds3231-receiver') diff --git a/sample-epaperdriverhat/build.gradle b/sample-epaperdriverhat/build.gradle index fd40f6e..7697fcf 100644 --- a/sample-epaperdriverhat/build.gradle +++ b/sample-epaperdriverhat/build.gradle @@ -47,7 +47,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" implementation project(':driver-epaperdriverhat') } diff --git a/sample-hcsr04/build.gradle b/sample-hcsr04/build.gradle index 757f5ea..3b8f1bb 100644 --- a/sample-hcsr04/build.gradle +++ b/sample-hcsr04/build.gradle @@ -47,7 +47,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" implementation project(':driver-hcsr04') } diff --git a/sample-hd44780/build.gradle b/sample-hd44780/build.gradle index 4b7d912..9575116 100644 --- a/sample-hd44780/build.gradle +++ b/sample-hd44780/build.gradle @@ -47,6 +47,6 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" implementation project(':driver-hd44780') } diff --git a/sample-lsm9ds1/build.gradle b/sample-lsm9ds1/build.gradle index 5367bc8..7310279 100644 --- a/sample-lsm9ds1/build.gradle +++ b/sample-lsm9ds1/build.gradle @@ -47,7 +47,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" implementation project(':driver-lsm9ds1') } diff --git a/sample-sh1106/build.gradle b/sample-sh1106/build.gradle index bed2e59..e40b2b4 100644 --- a/sample-sh1106/build.gradle +++ b/sample-sh1106/build.gradle @@ -47,7 +47,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" implementation project(':driver-sh1106') } diff --git a/sample-tsl256x/build.gradle b/sample-tsl256x/build.gradle index a58e2bd..251c97b 100644 --- a/sample-tsl256x/build.gradle +++ b/sample-tsl256x/build.gradle @@ -47,7 +47,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) compileOnly "com.google.android.things:androidthings:$versions.androidthings" - implementation "com.android.support:support-annotations:$versions.support" + implementation "androidx.annotation:annotation:$versions.androidx_annotations" implementation project(':driver-tsl256x') }