Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

Commit

Permalink
Update all drivers to version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leinardi committed May 10, 2018
1 parent 0b32b12 commit 015a8e6
Show file tree
Hide file tree
Showing 34 changed files with 258 additions and 150 deletions.
43 changes: 28 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,37 @@ os:
addons:
apt_packages:
- pandoc
before_install:

before_cache:
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
# Gradle dependencies
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

# Android build cache (see https://developer.android.com/studio/build/build-cache.html)
- $HOME/.android/build-cache

before_script:
- mkdir -p $ANDROID_HOME/licenses
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license

android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.0
- android-26
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
- mkdir -p $HOME/.android # silence sdkmanager warning
- echo 'count=0' > $HOME/.android/repositories.cfg # silence sdkmanager warning
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'tools' 'platform-tools' 'build-tools;27.0.3' > /dev/null
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-27' > /dev/null

script:
- ./gradlew clean check --profile
- 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
- pandoc `ls -1rt build/reports/profile/profile-*.html | tail -n1` -t plain
- ./gradlew dependencyUpdates
- ./gradlew dependencyUpdate # I must run this separately due to issues with the support library resolutionStrategy
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ For your convenience, drivers in this repository are also published to JCenter
as Maven artifacts. Look at their artifact and group ID in their build.gradle
and add them as dependencies to your own project.

For example, to use the `sh1106` driver, version `0.2`, simply add the line
For example, to use the `sh1106` driver, version `1.0`, simply add the line
below to your project's `build.gradle`:


```
dependencies {
compile 'com.leinardi.android.things:driver-sh1106:0.2'
compile 'com.leinardi.android.things:driver-sh1106:1.0'
}
```

Expand All @@ -35,13 +35,13 @@ dependencies {
<!-- DRIVER_LIST_START -->
Driver | Type | Usage (add to your gradle dependencies) | Note
:---:|:---:| --- | ---
[driver-ds3231](driver-ds3231) | real-time clock (RTC) | `implementation 'com.leinardi.android.things:driver-ds3231:0.2'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-ds3231/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-ds3231/maven-metadata.xml) [changelog](driver-ds3231/CHANGELOG.md) [sample](sample-ds3231) [driver-ds3231-receiver](driver-ds3231-receiver)
[driver-epaperdriverhat](driver-epaperdriverhat) | E-Paper Driver HAT | `implementation 'com.leinardi.android.things:driver-epaperdriverhat:0.2'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-epaperdriverhat/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-epaperdriverhat/maven-metadata.xml) [changelog](driver-epaperdriverhat/CHANGELOG.md) [sample](sample-epaperdriverhat)
[driver-hcsr04](driver-hcsr04) | ultrasonic ranging module | `implementation 'com.leinardi.android.things:driver-hcsr04:0.2'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-hcsr04/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-hcsr04/maven-metadata.xml) [changelog](driver-hcsr04/CHANGELOG.md) [sample](sample-hcsr04)
[driver-hd44780](driver-hd44780) | alphanumeric dot matrix LCD | `implementation 'com.leinardi.android.things:driver-hd44780:0.3'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-hd44780/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-hd44780/maven-metadata.xml) [changelog](driver-hd44780/CHANGELOG.md) [sample](sample-hd44780)
[driver-lsm9ds1](driver-lsm9ds1) | 3D accelerometer, 3D gyroscope, 3D magnetometer and temperature sensor | `implementation 'com.leinardi.android.things:driver-lsm9ds1:0.4'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-lsm9ds1/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-lsm9ds1/maven-metadata.xml) [changelog](driver-lsm9ds1/CHANGELOG.md) [sample](sample-lsm9ds1)
[driver-sh1106](driver-sh1106) | OLED display | `implementation 'com.leinardi.android.things:driver-sh1106:0.3'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-sh1106/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-sh1106/maven-metadata.xml) [changelog](driver-sh1106/CHANGELOG.md) [sample](sample-sh1106)
[driver-tsl256x](driver-tsl256x) | light-to-digital converter | `implementation 'com.leinardi.android.things:driver-tsl256x:0.2'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-tsl256x/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-tsl256x/maven-metadata.xml) [changelog](driver-tsl256x/CHANGELOG.md) [sample](sample-tsl256x)
[driver-ds3231](driver-ds3231) | real-time clock (RTC) | `implementation 'com.leinardi.android.things:driver-ds3231:1.0'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-ds3231/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-ds3231/maven-metadata.xml) [changelog](driver-ds3231/CHANGELOG.md) [sample](sample-ds3231) [driver-ds3231-receiver](driver-ds3231-receiver)
[driver-epaperdriverhat](driver-epaperdriverhat) | E-Paper Driver HAT | `implementation 'com.leinardi.android.things:driver-epaperdriverhat:1.0'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-epaperdriverhat/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-epaperdriverhat/maven-metadata.xml) [changelog](driver-epaperdriverhat/CHANGELOG.md) [sample](sample-epaperdriverhat)
[driver-hcsr04](driver-hcsr04) | ultrasonic ranging module | `implementation 'com.leinardi.android.things:driver-hcsr04:1.0'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-hcsr04/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-hcsr04/maven-metadata.xml) [changelog](driver-hcsr04/CHANGELOG.md) [sample](sample-hcsr04)
[driver-hd44780](driver-hd44780) | alphanumeric dot matrix LCD | `implementation 'com.leinardi.android.things:driver-hd44780:1.0'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-hd44780/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-hd44780/maven-metadata.xml) [changelog](driver-hd44780/CHANGELOG.md) [sample](sample-hd44780)
[driver-lsm9ds1](driver-lsm9ds1) | 3D accelerometer, 3D gyroscope, 3D magnetometer and temperature sensor | `implementation 'com.leinardi.android.things:driver-lsm9ds1:1.0'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-lsm9ds1/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-lsm9ds1/maven-metadata.xml) [changelog](driver-lsm9ds1/CHANGELOG.md) [sample](sample-lsm9ds1)
[driver-sh1106](driver-sh1106) | OLED display | `implementation 'com.leinardi.android.things:driver-sh1106:1.0'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-sh1106/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-sh1106/maven-metadata.xml) [changelog](driver-sh1106/CHANGELOG.md) [sample](sample-sh1106)
[driver-tsl256x](driver-tsl256x) | light-to-digital converter | `implementation 'com.leinardi.android.things:driver-tsl256x:1.0'` | [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/jcenter.bintray.com/com/leinardi/android/things/driver-tsl256x/maven-metadata.xml.svg)](https://jcenter.bintray.com/com/leinardi/android/things/driver-tsl256x/maven-metadata.xml) [changelog](driver-tsl256x/CHANGELOG.md) [sample](sample-tsl256x)
<!-- DRIVER_LIST_END -->

## Change of group ID and package name
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apply from: rootProject.file('versions-plugin.gradle')

buildscript {
repositories {
apply from: 'versions.gradle'
apply from: 'dependencies.gradle'
addRepos(repositories)
}
dependencies {
Expand Down
16 changes: 8 additions & 8 deletions versions.gradle → dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
ext.deps = [:]
def versions = [:]
versions.android_checkstyle_plugin = "1.0.0"
versions.android_gradle_plugin = "3.1.1"
versions.android_gradle_plugin = "3.1.2"
versions.android_maven_gradle_plugin = "2.1"
versions.androidthings = "0.7-devpreview"
versions.androidthings = "1.0"
versions.apache_commons = "2.5"
versions.arch = hasProperty("ARCH_VERSION") ? getProperty("ARCH_VERSION") : "1.0.0"
versions.arch = hasProperty("ARCH_VERSION") ? getProperty("ARCH_VERSION") : "1.1.0"
versions.atsl_rules = "1.0.1"
versions.atsl_runner = "1.0.1"
versions.constraint_layout = "1.0.2"
versions.dagger = "2.13"
versions.dagger = "2.14.1"
versions.dexmaker = "2.2.0"
versions.espresso = "3.0.1"
versions.glide = "3.8.0"
Expand All @@ -41,13 +41,13 @@ versions.junit = "4.12"
versions.kotlin = "1.2"
versions.mockito = "2.13.3"
versions.mockito_all = "1.10.19"
versions.mockwebserver = "3.8.1"
versions.powermock = "1.7.4"
versions.mockwebserver = "3.9.1"
versions.paging = "1.0.0-alpha3"
versions.play_services = "11.6.2"
versions.play_services = "12.5.20"
versions.powermock = "1.7.4"
versions.retrofit = "2.3.0"
versions.rx_android = "2.0.1"
versions.rxjava2 = "2.1.7"
versions.rxjava2 = "2.1.9"
versions.support = "27.1.1"
versions.timber = "4.6.0"
ext.versions = versions
Expand Down
5 changes: 5 additions & 0 deletions driver-ds3231-receiver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log

## [1.0] - 2018-05-10
### Updated
- update to Android Things 1.0

## [0.2] - 2018-04-07
### Updated
- update to Android Things devpreview-0.7

## [0.1] - 2018-01-09
Expand Down
4 changes: 3 additions & 1 deletion driver-ds3231-receiver/mavenConfig.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def mvn_config = [:]
mvn_config.repository = 'androidthings'
mvn_config.group_id = 'com.leinardi.android.things'
mvn_config.artifact_id = 'driver-ds3231-receiver'
mvn_config.version = '0.2'
mvn_config.version = '1.0'
mvn_config.licenses = 'Apache-2.0' // Comma separated
mvn_config.website = 'https://github.com/leinardi/androidthings-drivers'
mvn_config.issue_tracker_url = 'https://github.com/leinardi/androidthings-drivers/issues'
Expand All @@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config

apply from: rootProject.file('maven.gradle')

archivesBaseName = mvn_config.artifact_id
9 changes: 9 additions & 0 deletions driver-ds3231/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Change Log

## [1.0] - 2018-05-10
### Updated
- update to Android Things 1.0

## [1.0] - 2018-05-10
### Updated
- update to Android Things 1.0

## [0.2] - 2018-04-07
### Updated
- update to Android Things devpreview-0.7

## [0.1] - 2018-01-09
Expand Down
4 changes: 3 additions & 1 deletion driver-ds3231/mavenConfig.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def mvn_config = [:]
mvn_config.repository = 'androidthings'
mvn_config.group_id = 'com.leinardi.android.things'
mvn_config.artifact_id = 'driver-ds3231'
mvn_config.version = '0.2'
mvn_config.version = '1.0'
mvn_config.licenses = 'Apache-2.0' // Comma separated
mvn_config.website = 'https://github.com/leinardi/androidthings-drivers'
mvn_config.issue_tracker_url = 'https://github.com/leinardi/androidthings-drivers/issues'
Expand All @@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config

apply from: rootProject.file('maven.gradle')

archivesBaseName = mvn_config.artifact_id
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class Ds3231SensorDriver implements AutoCloseable {
private static final float DRIVER_POWER = Ds3231.MAX_POWER_CONSUMPTION_UA / 1000.f;
private static final float DRIVER_RESOLUTION = Ds3231.TEMPERATURE_RESOLUTION;
private static final int DRIVER_VERSION = 1;
private static final String DRIVER_REQUIRED_PERMISSION = "";

private Ds3231 mDevice;

Expand Down Expand Up @@ -125,7 +124,6 @@ private UserSensor getUserSensor() {
.setPower(DRIVER_POWER)
.setMinDelay(DRIVER_MIN_DELAY_US)
.setMaxDelay(DRIVER_MAX_DELAY_US)
.setRequiredPermission(DRIVER_REQUIRED_PERMISSION)
.setUuid(UUID.randomUUID())
.setDriver(this)
.build();
Expand Down
5 changes: 5 additions & 0 deletions driver-epaperdriverhat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log

## [1.0] - 2018-05-10
### Updated
- update to Android Things 1.0

## [0.2] - 2018-04-07
### Updated
- update to Android Things devpreview-0.7

## [0.1] - 2018-01-19
Expand Down
4 changes: 3 additions & 1 deletion driver-epaperdriverhat/mavenConfig.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def mvn_config = [:]
mvn_config.repository = 'androidthings'
mvn_config.group_id = 'com.leinardi.android.things'
mvn_config.artifact_id = 'driver-epaperdriverhat'
mvn_config.version = '0.2'
mvn_config.version = '1.0'
mvn_config.licenses = 'Apache-2.0' // Comma separated
mvn_config.website = 'https://github.com/leinardi/androidthings-drivers'
mvn_config.issue_tracker_url = 'https://github.com/leinardi/androidthings-drivers/issues'
Expand All @@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config

apply from: rootProject.file('maven.gradle')

archivesBaseName = mvn_config.artifact_id
5 changes: 5 additions & 0 deletions driver-hcsr04/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log

## [1.0] - 2018-05-10
### Updated
- update to Android Things 1.0

## [0.2] - 2018-04-07
### Updated
- update to Android Things devpreview-0.7

## [0.1] - 2018-01-02
Expand Down
4 changes: 3 additions & 1 deletion driver-hcsr04/mavenConfig.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def mvn_config = [:]
mvn_config.repository = 'androidthings'
mvn_config.group_id = 'com.leinardi.android.things'
mvn_config.artifact_id = 'driver-hcsr04'
mvn_config.version = '0.2'
mvn_config.version = '1.0'
mvn_config.licenses = 'Apache-2.0' // Comma separated
mvn_config.website = 'https://github.com/leinardi/androidthings-drivers'
mvn_config.issue_tracker_url = 'https://github.com/leinardi/androidthings-drivers/issues'
Expand All @@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config

apply from: rootProject.file('maven.gradle')

archivesBaseName = mvn_config.artifact_id
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class Hcsr04SensorDriver implements AutoCloseable {
private static final float DRIVER_POWER = Hcsr04.MAX_POWER_CONSUMPTION_UA / 1000.f;
private static final float DRIVER_RESOLUTION = Hcsr04.ACCURACY;
private static final int DRIVER_VERSION = 1;
private static final String DRIVER_REQUIRED_PERMISSION = "";

private Hcsr04 mDevice;

Expand Down Expand Up @@ -112,7 +111,6 @@ private UserSensor getUserSensor() {
.setPower(DRIVER_POWER)
.setMinDelay(DRIVER_MIN_DELAY_US)
.setMaxDelay(DRIVER_MAX_DELAY_US)
.setRequiredPermission(DRIVER_REQUIRED_PERMISSION)
.setUuid(UUID.randomUUID())
.setDriver(this)
.build();
Expand Down
6 changes: 6 additions & 0 deletions driver-hd44780/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Change Log

## [1.0] - 2018-05-10
### Updated
- update to Android Things 1.0

## [0.3] - 2018-04-07
### Updated
- update to Android Things devpreview-0.7

## [0.2] - 2017-12-28
### Updated
- changed package name and group id
- improved implementation of delayMicroseconds()

Expand Down
2 changes: 2 additions & 0 deletions driver-hd44780/mavenConfig.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config

apply from: rootProject.file('maven.gradle')

archivesBaseName = mvn_config.artifact_id
8 changes: 8 additions & 0 deletions driver-lsm9ds1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# Change Log

## [1.0] - 2018-05-10
### Updated
- update to Android Things 1.0

## [0.5] - 2018-04-07
### Updated
- update to Android Things devpreview-0.7

## [0.4] - 2018-01-07
### Updated
- changed getAccelerometerHighResolution() and getMagnetometerTemperatureCompensation()
to isAccelerometerHighResolution() and isMagnetometerTemperatureCompensation().

## [0.3] - 2017-12-31
### Updated
- more accurate sensor consumption

## [0.2] - 2017-12-28
### Updated
- changed package name and group id

## [0.1] - 2017-12-24
Expand Down
2 changes: 2 additions & 0 deletions driver-lsm9ds1/mavenConfig.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config

apply from: rootProject.file('maven.gradle')

archivesBaseName = mvn_config.artifact_id
Loading

0 comments on commit 015a8e6

Please sign in to comment.