aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAng Li <angli@google.com>2019-01-28 16:30:16 -0800
committerGitHub <noreply@github.com>2019-01-28 16:30:16 -0800
commite95b40a3249b47bb55de05cc53a25ae679ad9216 (patch)
treebfdef996639114127ae2ba09700c13e2c5e23085
parent69b6fb3bbd386b6a2743e2a4cf5bde8ac48c74ed (diff)
downloadmobly-snippet-lib-e95b40a3249b47bb55de05cc53a25ae679ad9216.tar.gz
Update toolchain and make the lib build again. (#100)
The presubmit command now works and generates a report.
-rw-r--r--build.gradle2
-rw-r--r--examples/ex2_espresso/build.gradle4
-rw-r--r--examples/ex6_complex_type_conversion/build.gradle2
-rw-r--r--gradle/wrapper/gradle-wrapper.properties4
-rw-r--r--third_party/sl4a/build.gradle4
-rw-r--r--third_party/sl4a/src/main/java/com/google/android/mobly/snippet/SnippetRunner.java2
-rw-r--r--third_party/sl4a/src/main/java/com/google/android/mobly/snippet/event/EventSnippet.java14
-rw-r--r--third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/MethodDescriptor.java2
8 files changed, 14 insertions, 20 deletions
diff --git a/build.gradle b/build.gradle
index 2d60450..6f34b83 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.2'
+ classpath 'com.android.tools.build:gradle:3.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/examples/ex2_espresso/build.gradle b/examples/ex2_espresso/build.gradle
index 7de0a9f..47063e6 100644
--- a/examples/ex2_espresso/build.gradle
+++ b/examples/ex2_espresso/build.gradle
@@ -7,14 +7,14 @@ android {
defaultConfig {
applicationId "com.google.android.mobly.snippet.example2"
minSdkVersion 15
- targetSdkVersion 22
+ targetSdkVersion 26
versionCode 1
versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
productFlavors {
- main {
+ original {
dimension "examples"
}
snippet {
diff --git a/examples/ex6_complex_type_conversion/build.gradle b/examples/ex6_complex_type_conversion/build.gradle
index aa71705..af05a85 100644
--- a/examples/ex6_complex_type_conversion/build.gradle
+++ b/examples/ex6_complex_type_conversion/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 26
- buildToolsVersion '27.0.3'
+ buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.google.android.mobly.snippet.example6"
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 649f440..74643ca 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon May 21 15:30:28 PDT 2018
+#Mon Jan 28 16:01:11 PST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
diff --git a/third_party/sl4a/build.gradle b/third_party/sl4a/build.gradle
index 24fafc0..d5d4518 100644
--- a/third_party/sl4a/build.gradle
+++ b/third_party/sl4a/build.gradle
@@ -10,7 +10,7 @@ buildscript {
}
plugins {
- id 'com.github.sherter.google-java-format' version '0.6'
+ id 'com.github.sherter.google-java-format' version '0.8'
id 'com.github.dcendents.android-maven' version '2.0'
}
@@ -76,8 +76,6 @@ task sourcesJar(type: Jar) {
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
- classpath += project.files(
- android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
diff --git a/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/SnippetRunner.java b/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/SnippetRunner.java
index f79a4b4..ea1d71f 100644
--- a/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/SnippetRunner.java
+++ b/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/SnippetRunner.java
@@ -50,13 +50,11 @@ import java.util.Locale;
* <li>'stop' action prints 'OK (0 tests)'
* <li>'start' action prints nothing.
* </ul>
- *
* <li>v1.0: New instrumentation output added to track bringup process
* <ul>
* <li>"SNIPPET START, PROTOCOL &lt;major&gt; &lt;minor&gt;" upon snippet start
* <li>"SNIPPET SERVING, PORT &lt;port&gt;" once server is ready
* </ul>
- *
* </ul>
*/
public class SnippetRunner extends AndroidJUnitRunner {
diff --git a/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/event/EventSnippet.java b/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/event/EventSnippet.java
index ee1a21a..05e044c 100644
--- a/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/event/EventSnippet.java
+++ b/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/event/EventSnippet.java
@@ -40,9 +40,8 @@ public class EventSnippet implements Snippet {
private final EventCache mEventCache = EventCache.getInstance();
@Rpc(
- description =
- "Blocks until an event of a specified type has been received. The returned event is removed from the cache. Default timeout is 60s."
- )
+ description =
+ "Blocks until an event of a specified type has been received. The returned event is removed from the cache. Default timeout is 60s.")
public JSONObject eventWaitAndGet(
String callbackId, String eventName, @Nullable Integer timeout)
throws InterruptedException, JSONException, EventSnippetException {
@@ -61,11 +60,10 @@ public class EventSnippet implements Snippet {
}
@Rpc(
- description =
- "Gets and removes all the events of a certain name that have been received so far. "
- + "Non-blocking. Potentially racey since it does not guarantee no event of "
- + "the same name will occur after the call."
- )
+ description =
+ "Gets and removes all the events of a certain name that have been received so far. "
+ + "Non-blocking. Potentially racey since it does not guarantee no event of "
+ + "the same name will occur after the call.")
public List<JSONObject> eventGetAll(String callbackId, String eventName)
throws InterruptedException, JSONException {
String qId = EventCache.getQueueId(callbackId, eventName);
diff --git a/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/MethodDescriptor.java b/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/MethodDescriptor.java
index 7d3ca1f..11eb9ce 100644
--- a/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/MethodDescriptor.java
+++ b/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/MethodDescriptor.java
@@ -91,7 +91,7 @@ public final class MethodDescriptor {
// TODO(damonkohler): This signature is a bit weird (auto-refactored). The obvious alternative
// would be to work on one supplied parameter and return the converted parameter. However,
// that's problematic because you lose the ability to call the getXXX methods on the JSON array.
- //@VisibleForTesting
+ // @VisibleForTesting
private static Object convertParameter(final JSONArray parameters, int index, Type type)
throws JSONException, RpcError {
try {