Skip to content

Commit

Permalink
Update to DP6 and fix vcnl4200 and motorhat
Browse files Browse the repository at this point in the history
Add README and metadata for VCNL4200
Fix Motorhat package
Update Gradle to 3.0.1
Update android things SDK to DP6 (except VoiceHat)
Update Gradle syntax

TEST: './gradlew clean test' works
TEST: './gradlew -PPUBLISHING publishToMavenLocal' works

Change-Id: I1ad9208427b0a93f966bec2d2f192401aa93679a
  • Loading branch information
mangini committed Nov 30, 2017
1 parent c7797a1 commit 017bb92
Show file tree
Hide file tree
Showing 31 changed files with 224 additions and 145 deletions.
11 changes: 6 additions & 5 deletions adcv2x/build.gradle
Expand Up @@ -30,10 +30,11 @@ android {
}

dependencies {
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
compile 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'

testCompile project(':testingutils')
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation project(':testingutils')
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
}
13 changes: 7 additions & 6 deletions apa102/build.gradle
Expand Up @@ -29,11 +29,12 @@ android {
}

dependencies {
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
compile 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'

testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.powermock:powermock-module-junit4:1.6.6'
testCompile 'org.powermock:powermock-api-mockito:1.6.6'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.powermock:powermock-module-junit4:1.6.6'
testImplementation 'org.powermock:powermock-api-mockito:1.6.6'
}
11 changes: 6 additions & 5 deletions bmx280/build.gradle
Expand Up @@ -29,10 +29,11 @@ android {
}

dependencies {
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
compile 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'

testCompile project(':testingutils')
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation project(':testingutils')
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
}
3 changes: 2 additions & 1 deletion build.gradle
Expand Up @@ -16,10 +16,11 @@

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
22 changes: 12 additions & 10 deletions button/build.gradle
Expand Up @@ -31,16 +31,18 @@ android {
}

dependencies {
compile 'com.android.support:support-annotations:24.2.0'
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'

androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
androidTestImplementation 'com.google.android.things:androidthings:0.6-devpreview'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestImplementation 'org.mockito:mockito-core:1.10.19'
androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'

testCompile 'org.powermock:powermock-module-junit4:1.6.6'
testCompile 'org.powermock:powermock-classloading-base:1.6.6'
testCompile 'org.powermock:powermock-classloading-xstream:1.6.6'
testCompile 'org.powermock:powermock-api-mockito:1.6.6'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'org.powermock:powermock-module-junit4:1.6.6'
testImplementation 'org.powermock:powermock-classloading-base:1.6.6'
testImplementation 'org.powermock:powermock-classloading-xstream:1.6.6'
testImplementation 'org.powermock:powermock-api-mockito:1.6.6'
}
22 changes: 12 additions & 10 deletions cap12xx/build.gradle
Expand Up @@ -45,18 +45,20 @@ android {
}

dependencies {
compile 'com.android.support:support-annotations:24.2.0'
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'

testCompile project(':testingutils')
testCompile 'org.powermock:powermock-module-junit4:1.6.6'
testCompile 'org.powermock:powermock-classloading-base:1.6.6'
testCompile 'org.powermock:powermock-classloading-xstream:1.6.6'
testCompile 'org.powermock:powermock-api-mockito:1.6.6'
testImplementation project(':testingutils')
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'org.powermock:powermock-module-junit4:1.6.6'
testImplementation 'org.powermock:powermock-classloading-base:1.6.6'
testImplementation 'org.powermock:powermock-classloading-xstream:1.6.6'
testImplementation 'org.powermock:powermock-api-mockito:1.6.6'

androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
androidTestImplementation 'com.google.android.things:androidthings:0.6-devpreview'
androidTestImplementation 'org.mockito:mockito-core:1.10.19'
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
}
4 changes: 2 additions & 2 deletions gps/build.gradle
Expand Up @@ -29,6 +29,6 @@ android {
}

dependencies {
compile 'com.android.support:support-annotations:24.2.0'
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Wed Jan 25 12:34:01 PST 2017
#Wed Nov 29 16:32:45 PST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
26 changes: 17 additions & 9 deletions gradlew
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
13 changes: 7 additions & 6 deletions ht16k33/build.gradle
Expand Up @@ -29,11 +29,12 @@ android {
}

dependencies {
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
compile 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'

testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.powermock:powermock-module-junit4:1.6.6'
testCompile 'org.powermock:powermock-api-mockito:1.6.6'
testImplementation 'junit:junit:4.12'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.powermock:powermock-module-junit4:1.6.6'
testImplementation 'org.powermock:powermock-api-mockito:1.6.6'
}
20 changes: 11 additions & 9 deletions matrixkeypad/build.gradle
Expand Up @@ -31,15 +31,17 @@ android {
}

dependencies {
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'

androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
androidTestImplementation 'com.google.android.things:androidthings:0.6-devpreview'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestImplementation 'org.mockito:mockito-core:1.10.19'
androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'

testCompile 'org.powermock:powermock-module-junit4:1.6.6'
testCompile 'org.powermock:powermock-classloading-base:1.6.6'
testCompile 'org.powermock:powermock-classloading-xstream:1.6.6'
testCompile 'org.powermock:powermock-api-mockito:1.6.6'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'org.powermock:powermock-module-junit4:1.6.6'
testImplementation 'org.powermock:powermock-classloading-base:1.6.6'
testImplementation 'org.powermock:powermock-classloading-xstream:1.6.6'
testImplementation 'org.powermock:powermock-api-mockito:1.6.6'
}
9 changes: 5 additions & 4 deletions mma7660fc/build.gradle
Expand Up @@ -29,9 +29,10 @@ android {
}

dependencies {
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
compile 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'

testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
}
21 changes: 11 additions & 10 deletions motorhat/build.gradle
Expand Up @@ -16,25 +16,26 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
compileSdkVersion 26
buildToolsVersion '27.0.1'

defaultConfig {
minSdkVersion 24
targetSdkVersion 24
minSdkVersion 26
targetSdkVersion 26
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}

dependencies {
provided 'com.google.android.things:androidthings:0.4-devpreview'
compile 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'

androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestImplementation 'com.google.android.things:androidthings:0.6-devpreview'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'

testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
}
2 changes: 1 addition & 1 deletion motorhat/src/main/AndroidManifest.xml
Expand Up @@ -15,7 +15,7 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.motorhat">
package="com.google.android.things.contrib.driver.motorhat">
<application>
<uses-library android:required="false" android:name="com.google.android.things"/>
</application>
Expand Down
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.motorhat;
package com.google.android.things.contrib.driver.motorhat;

import android.support.annotation.IntDef;
import android.support.annotation.VisibleForTesting;
Expand Down
@@ -1,4 +1,4 @@
package com.example.motorhat;
package com.google.android.things.contrib.driver.motorhat;

import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down
4 changes: 1 addition & 3 deletions publish.gradle
Expand Up @@ -48,8 +48,7 @@ subprojects {

def artifactVersion = snapshot ? "LATEST" : ARTIFACT_VERSION

publishing {
publications {
publishing.publications {
"$publicationName"(MavenPublication) {
groupId 'com.google.android.things.contrib'
artifactId "driver-$project.name"
Expand All @@ -70,7 +69,6 @@ subprojects {
}
}
}
}
}

bintray {
Expand Down
9 changes: 5 additions & 4 deletions pwmservo/build.gradle
Expand Up @@ -29,9 +29,10 @@ android {
}

dependencies {
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
compile 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'

testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
}
9 changes: 5 additions & 4 deletions pwmspeaker/build.gradle
Expand Up @@ -29,9 +29,10 @@ android {
}

dependencies {
provided 'com.google.android.things:androidthings:0.5.1-devpreview'
compile 'com.android.support:support-annotations:24.2.0'
compileOnly 'com.google.android.things:androidthings:0.6-devpreview'
implementation 'com.android.support:support-annotations:24.2.0'

testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testImplementation 'com.google.android.things:androidthings:0.6-devpreview'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
}

0 comments on commit 017bb92

Please sign in to comment.