diff --git a/.travis.yml b/.travis.yml index 9e84f4a..0a23ff0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index 65a4248..46e7951 100644 --- a/README.md +++ b/README.md @@ -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' } ``` @@ -35,13 +35,13 @@ dependencies { 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) ## Change of group ID and package name diff --git a/build.gradle b/build.gradle index bc2579b..15d11f5 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ apply from: rootProject.file('versions-plugin.gradle') buildscript { repositories { - apply from: 'versions.gradle' + apply from: 'dependencies.gradle' addRepos(repositories) } dependencies { diff --git a/versions.gradle b/dependencies.gradle similarity index 97% rename from versions.gradle rename to dependencies.gradle index b6d05d3..90ed686 100644 --- a/versions.gradle +++ b/dependencies.gradle @@ -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" @@ -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 diff --git a/driver-ds3231-receiver/CHANGELOG.md b/driver-ds3231-receiver/CHANGELOG.md index 9a624ad..8c5f1f6 100644 --- a/driver-ds3231-receiver/CHANGELOG.md +++ b/driver-ds3231-receiver/CHANGELOG.md @@ -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 diff --git a/driver-ds3231-receiver/mavenConfig.gradle b/driver-ds3231-receiver/mavenConfig.gradle index 33612c8..89bd544 100644 --- a/driver-ds3231-receiver/mavenConfig.gradle +++ b/driver-ds3231-receiver/mavenConfig.gradle @@ -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' @@ -34,3 +34,5 @@ mvn_config.override = true ext.mvn_config = mvn_config apply from: rootProject.file('maven.gradle') + +archivesBaseName = mvn_config.artifact_id diff --git a/driver-ds3231/CHANGELOG.md b/driver-ds3231/CHANGELOG.md index 9a624ad..6641bf4 100644 --- a/driver-ds3231/CHANGELOG.md +++ b/driver-ds3231/CHANGELOG.md @@ -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 diff --git a/driver-ds3231/mavenConfig.gradle b/driver-ds3231/mavenConfig.gradle index 8e27997..a2e6490 100644 --- a/driver-ds3231/mavenConfig.gradle +++ b/driver-ds3231/mavenConfig.gradle @@ -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' @@ -34,3 +34,5 @@ mvn_config.override = true ext.mvn_config = mvn_config apply from: rootProject.file('maven.gradle') + +archivesBaseName = mvn_config.artifact_id 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 ac657fe..64d89f4 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 @@ -435,8 +435,9 @@ public boolean isSquareWaveEnabled() throws IOException { *
* It is set to false when power is first applied.
*
- * @param enabled When set to true with {@link #isInterruptControlEnable()} equals false and V CC < V PF , it
- * enables the square wave. When false, the INT/SQW pin goes high impedance when V CC < V PF.
+ * @param enabled When set to true with {@link #isInterruptControlEnable()} equals false and V CC lower than V
+ * PFm, it enables the square wave. When false, the INT/SQW pin goes high impedance when V CC is
+ * lower than V PF.
* @throws IOException
*/
public void setSquareWave(boolean enabled) throws IOException {
diff --git a/driver-ds3231/src/main/java/com/leinardi/android/things/driver/ds3231/Ds3231SensorDriver.java b/driver-ds3231/src/main/java/com/leinardi/android/things/driver/ds3231/Ds3231SensorDriver.java
index 9314900..a37b538 100644
--- a/driver-ds3231/src/main/java/com/leinardi/android/things/driver/ds3231/Ds3231SensorDriver.java
+++ b/driver-ds3231/src/main/java/com/leinardi/android/things/driver/ds3231/Ds3231SensorDriver.java
@@ -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;
@@ -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();
diff --git a/driver-epaperdriverhat/CHANGELOG.md b/driver-epaperdriverhat/CHANGELOG.md
index 39b68f9..295d089 100644
--- a/driver-epaperdriverhat/CHANGELOG.md
+++ b/driver-epaperdriverhat/CHANGELOG.md
@@ -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
diff --git a/driver-epaperdriverhat/mavenConfig.gradle b/driver-epaperdriverhat/mavenConfig.gradle
index ed8d60b..5906243 100644
--- a/driver-epaperdriverhat/mavenConfig.gradle
+++ b/driver-epaperdriverhat/mavenConfig.gradle
@@ -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'
@@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config
apply from: rootProject.file('maven.gradle')
+
+archivesBaseName = mvn_config.artifact_id
diff --git a/driver-hcsr04/CHANGELOG.md b/driver-hcsr04/CHANGELOG.md
index ec3e94c..bf85674 100644
--- a/driver-hcsr04/CHANGELOG.md
+++ b/driver-hcsr04/CHANGELOG.md
@@ -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
diff --git a/driver-hcsr04/mavenConfig.gradle b/driver-hcsr04/mavenConfig.gradle
index 8292564..456dfce 100644
--- a/driver-hcsr04/mavenConfig.gradle
+++ b/driver-hcsr04/mavenConfig.gradle
@@ -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'
@@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config
apply from: rootProject.file('maven.gradle')
+
+archivesBaseName = mvn_config.artifact_id
diff --git a/driver-hcsr04/src/main/java/com/leinardi/android/things/driver/hcsr04/Hcsr04.java b/driver-hcsr04/src/main/java/com/leinardi/android/things/driver/hcsr04/Hcsr04.java
index 8309096..fb00ccc 100644
--- a/driver-hcsr04/src/main/java/com/leinardi/android/things/driver/hcsr04/Hcsr04.java
+++ b/driver-hcsr04/src/main/java/com/leinardi/android/things/driver/hcsr04/Hcsr04.java
@@ -145,8 +145,6 @@ public float readDistance() {
/**
* Close the driver and the underlying device.
- *
- * @throws IOException
*/
@Override
public void close() {
diff --git a/driver-hcsr04/src/main/java/com/leinardi/android/things/driver/hcsr04/Hcsr04SensorDriver.java b/driver-hcsr04/src/main/java/com/leinardi/android/things/driver/hcsr04/Hcsr04SensorDriver.java
index 1001f0d..5d19154 100644
--- a/driver-hcsr04/src/main/java/com/leinardi/android/things/driver/hcsr04/Hcsr04SensorDriver.java
+++ b/driver-hcsr04/src/main/java/com/leinardi/android/things/driver/hcsr04/Hcsr04SensorDriver.java
@@ -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;
@@ -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();
diff --git a/driver-hd44780/CHANGELOG.md b/driver-hd44780/CHANGELOG.md
index f667975..18afadb 100644
--- a/driver-hd44780/CHANGELOG.md
+++ b/driver-hd44780/CHANGELOG.md
@@ -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()
diff --git a/driver-hd44780/mavenConfig.gradle b/driver-hd44780/mavenConfig.gradle
index f69c054..49a7d19 100644
--- a/driver-hd44780/mavenConfig.gradle
+++ b/driver-hd44780/mavenConfig.gradle
@@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config
apply from: rootProject.file('maven.gradle')
+
+archivesBaseName = mvn_config.artifact_id
diff --git a/driver-lsm9ds1/CHANGELOG.md b/driver-lsm9ds1/CHANGELOG.md
index 3ff9462..0069132 100644
--- a/driver-lsm9ds1/CHANGELOG.md
+++ b/driver-lsm9ds1/CHANGELOG.md
@@ -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
diff --git a/driver-lsm9ds1/mavenConfig.gradle b/driver-lsm9ds1/mavenConfig.gradle
index a7fc3c0..f25b1c6 100644
--- a/driver-lsm9ds1/mavenConfig.gradle
+++ b/driver-lsm9ds1/mavenConfig.gradle
@@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config
apply from: rootProject.file('maven.gradle')
+
+archivesBaseName = mvn_config.artifact_id
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 04a4b58..b584b0e 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
@@ -255,7 +255,6 @@ private class AccelerationUserDriver implements UserSensorDriver {
private static final float DRIVER_MAX_RANGE = Lsm9ds1.MAX_ACCEL_RANGE_G_DEFAULT;
private static final float DRIVER_POWER = Lsm9ds1.MAX_POWER_CONSUMPTION_X_UA / 1000.f;
private static final int DRIVER_VERSION = 1;
- private static final String DRIVER_REQUIRED_PERMISSION = "";
private boolean mEnabled;
private UserSensor mUserSensor;
@@ -272,7 +271,6 @@ private UserSensor getUserSensor() {
.setPower(DRIVER_POWER)
.setMinDelay(DRIVER_XG_MIN_DELAY_US)
.setMaxDelay(DRIVER_XG_MAX_DELAY_US)
- .setRequiredPermission(DRIVER_REQUIRED_PERMISSION)
.setUuid(UUID.randomUUID())
.setDriver(this)
.build();
@@ -302,7 +300,6 @@ private class AngularVelocityUserDriver implements UserSensorDriver {
private static final float DRIVER_MAX_RANGE = Lsm9ds1.MAX_GYRO_RATE_DPS_DEFAULT;
private static final float DRIVER_POWER = Lsm9ds1.MAX_POWER_CONSUMPTION_G_UA / 1000.f;
private static final int DRIVER_VERSION = 1;
- private static final String DRIVER_REQUIRED_PERMISSION = "";
private boolean mEnabled;
private UserSensor mUserSensor;
@@ -319,7 +316,6 @@ private UserSensor getUserSensor() {
.setPower(DRIVER_POWER)
.setMinDelay(DRIVER_XG_MIN_DELAY_US)
.setMaxDelay(DRIVER_XG_MAX_DELAY_US)
- .setRequiredPermission(DRIVER_REQUIRED_PERMISSION)
.setUuid(UUID.randomUUID())
.setDriver(this)
.build();
@@ -349,7 +345,6 @@ private class MagneticInductionUserDriver implements UserSensorDriver {
private static final float DRIVER_MAX_RANGE = Lsm9ds1.MAX_MAG_GAIN_GS_DEFAULT;
private static final float DRIVER_POWER = Lsm9ds1.MAX_POWER_CONSUMPTION_M_UA / 1000.f;
private static final int DRIVER_VERSION = 1;
- private static final String DRIVER_REQUIRED_PERMISSION = "";
private boolean mEnabled;
private UserSensor mUserSensor;
@@ -366,7 +361,6 @@ private UserSensor getUserSensor() {
.setPower(DRIVER_POWER)
.setMinDelay(DRIVER_MAG_MIN_DELAY_US)
.setMaxDelay(DRIVER_MAG_MAX_DELAY_US)
- .setRequiredPermission(DRIVER_REQUIRED_PERMISSION)
.setUuid(UUID.randomUUID())
.setDriver(this)
.build();
@@ -397,7 +391,6 @@ private class TemperatureUserDriver implements UserSensorDriver {
// The temperature is provided by the Accel
private static final float DRIVER_POWER = Lsm9ds1.MAX_POWER_CONSUMPTION_X_UA / 1000.f;
private static final int DRIVER_VERSION = 1;
- private static final String DRIVER_REQUIRED_PERMISSION = "";
private boolean mEnabled;
private UserSensor mUserSensor;
@@ -414,7 +407,6 @@ private UserSensor getUserSensor() {
.setPower(DRIVER_POWER)
.setMinDelay(DRIVER_XG_MIN_DELAY_US)
.setMaxDelay(DRIVER_XG_MAX_DELAY_US)
- .setRequiredPermission(DRIVER_REQUIRED_PERMISSION)
.setUuid(UUID.randomUUID())
.setDriver(this)
.build();
diff --git a/driver-sh1106/CHANGELOG.md b/driver-sh1106/CHANGELOG.md
index 06a9272..8be00b2 100644
--- a/driver-sh1106/CHANGELOG.md
+++ b/driver-sh1106/CHANGELOG.md
@@ -1,9 +1,11 @@
# Change Log
## [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
## [0.1] - 2017-12-04
diff --git a/driver-sh1106/mavenConfig.gradle b/driver-sh1106/mavenConfig.gradle
index c92e9e6..09b34c2 100644
--- a/driver-sh1106/mavenConfig.gradle
+++ b/driver-sh1106/mavenConfig.gradle
@@ -18,7 +18,7 @@ def mvn_config = [:]
mvn_config.repository = 'androidthings'
mvn_config.group_id = 'com.leinardi.android.things'
mvn_config.artifact_id = 'driver-sh1106'
-mvn_config.version = '0.3'
+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'
@@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config
apply from: rootProject.file('maven.gradle')
+
+archivesBaseName = mvn_config.artifact_id
diff --git a/driver-sh1106/src/main/java/com/leinardi/android/things/driver/sh1106/BitmapHelper.java b/driver-sh1106/src/main/java/com/leinardi/android/things/driver/sh1106/BitmapHelper.java
index 9e2c78e..48fb507 100644
--- a/driver-sh1106/src/main/java/com/leinardi/android/things/driver/sh1106/BitmapHelper.java
+++ b/driver-sh1106/src/main/java/com/leinardi/android/things/driver/sh1106/BitmapHelper.java
@@ -74,7 +74,6 @@ public static void setBmpData(Sh1106 mScreen, int xOffset, int yOffset, Bitmap b
* @param offset The byte offset to start writing screen bitmap data at.
* @param bmp The bitmap image that you want to convert to screen data.
* @param drawWhite Set to true to draw white pixels, false to draw pixels based on gradient.
- * @return A byte array with pixel data for the SH1106.
*/
public static void bmpToBytes(byte[][] buffer, int offset, Bitmap bmp, boolean drawWhite) {
int width = bmp.getWidth();
diff --git a/driver-tsl256x/CHANGELOG.md b/driver-tsl256x/CHANGELOG.md
index 892f81d..3e5d063 100644
--- a/driver-tsl256x/CHANGELOG.md
+++ b/driver-tsl256x/CHANGELOG.md
@@ -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-02-04
diff --git a/driver-tsl256x/mavenConfig.gradle b/driver-tsl256x/mavenConfig.gradle
index 4a9c2b7..d26aa25 100644
--- a/driver-tsl256x/mavenConfig.gradle
+++ b/driver-tsl256x/mavenConfig.gradle
@@ -18,7 +18,7 @@ def mvn_config = [:]
mvn_config.repository = 'androidthings'
mvn_config.group_id = 'com.leinardi.android.things'
mvn_config.artifact_id = 'driver-tsl256x'
-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'
@@ -34,3 +34,5 @@ mvn_config.override = true
ext.mvn_config = mvn_config
apply from: rootProject.file('maven.gradle')
+
+archivesBaseName = mvn_config.artifact_id
diff --git a/driver-tsl256x/src/main/java/com/leinardi/android/things/driver/tsl256x/Tsl256xSensorDriver.java b/driver-tsl256x/src/main/java/com/leinardi/android/things/driver/tsl256x/Tsl256xSensorDriver.java
index 9d7f245..49da2e6 100644
--- a/driver-tsl256x/src/main/java/com/leinardi/android/things/driver/tsl256x/Tsl256xSensorDriver.java
+++ b/driver-tsl256x/src/main/java/com/leinardi/android/things/driver/tsl256x/Tsl256xSensorDriver.java
@@ -37,7 +37,6 @@ public class Tsl256xSensorDriver implements AutoCloseable {
private static final float DRIVER_MAX_RANGE = Tsl256x.MAX_RANGE_LUX;
private static final float DRIVER_POWER = Tsl256x.MAX_POWER_CONSUMPTION_UA / 1000.f;
private static final int DRIVER_VERSION = 1;
- private static final String DRIVER_REQUIRED_PERMISSION = "";
private Tsl256x mDevice;
@@ -125,7 +124,6 @@ private UserSensor getUserSensor() {
.setPower(DRIVER_POWER)
.setMinDelay(DRIVER_XG_MIN_DELAY_US)
.setMaxDelay(DRIVER_XG_MAX_DELAY_US)
- .setRequiredPermission(DRIVER_REQUIRED_PERMISSION)
.setUuid(UUID.randomUUID())
.setDriver(this)
.build();
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index deb740b..672eb28 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -17,4 +17,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
diff --git a/maven.gradle b/maven.gradle
index 465822b..538c4b4 100644
--- a/maven.gradle
+++ b/maven.gradle
@@ -14,62 +14,72 @@
* limitations under the License.
*/
-apply plugin: 'com.github.dcendents.android-maven'
+def isMavenAvailable = false
+try {
+ "mvn -version".execute().waitFor() // Check if Maven binary is available
+ isMavenAvailable = true
+} catch (IOException ignore) {
+ logger.warn("Maven binary not available, pubishing to Bintray not possible.")
+}
+
+if (isMavenAvailable) {
+ apply plugin: 'com.github.dcendents.android-maven'
-install {
- repositories.mavenInstaller.pom.project {
- name mvn_config.artifact_id
- description mvn_config.description
- url mvn_config.website
- inceptionYear mvn_config.inception_year
+ install {
+ repositories.mavenInstaller.pom.project {
+ name mvn_config.artifact_id
+ description mvn_config.description
+ url mvn_config.website
+ inceptionYear mvn_config.inception_year
- packaging 'aar'
- groupId mvn_config.group_id
- artifactId mvn_config.artifact_id
- version mvn_config.version
+ packaging 'aar'
+ groupId mvn_config.group_id
+ artifactId mvn_config.artifact_id
+ version mvn_config.version
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- distribution 'repo'
+ licenses {
+ license {
+ name 'The Apache Software License, Version 2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ distribution 'repo'
+ }
}
- }
- scm {
- connection mvn_config.vcs_url
- url mvn_config.website
+ scm {
+ connection mvn_config.vcs_url
+ url mvn_config.website
- }
- developers {
- developer {
- name "Roberto Leinardi"
- email "roberto@leinardi.com"
+ }
+ developers {
+ developer {
+ name "Roberto Leinardi"
+ email "roberto@leinardi.com"
+ }
}
}
}
-}
-task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- classifier = 'sources'
-}
+ task sourcesJar(type: Jar) {
+ from android.sourceSets.main.java.srcDirs
+ classifier = 'sources'
+ }
-task javadoc(type: Javadoc) {
- source = android.sourceSets.main.java.srcDirs
- classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
-}
+ task javadoc(type: Javadoc) {
+ source = android.sourceSets.main.java.srcDirs
+ classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+ }
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-artifacts {
- archives javadocJar
- archives sourcesJar
-}
+ task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+ }
+ artifacts {
+ archives javadocJar
+ archives sourcesJar
+ }
-afterEvaluate {
- javadoc.classpath += project.android.libraryVariants.toList().first().javaCompile.classpath
-}
+ afterEvaluate {
+ javadoc.classpath += project.android.libraryVariants.toList().first().javaCompile.classpath
+ }
-apply from: rootProject.file('bintray.gradle')
+ apply from: rootProject.file('bintray.gradle')
+}
diff --git a/sample-ds3231/src/main/AndroidManifest.xml b/sample-ds3231/src/main/AndroidManifest.xml
index f727f63..29b3ea9 100644
--- a/sample-ds3231/src/main/AndroidManifest.xml
+++ b/sample-ds3231/src/main/AndroidManifest.xml
@@ -19,6 +19,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
+