aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Jin <kjin@google.com>2015-02-11 18:18:18 -0800
committerKevin Jin <kjin@google.com>2015-02-11 18:29:06 -0800
commit85ac3efb066be44e93941edb24157c22a5a365de (patch)
treef4ca719aa980961a30e30133b2fec3f2be812e30
parentf8184a4babf7ab9cc356b1c61170869a6d6ce13c (diff)
downloaddroiddriver-85ac3efb066be44e93941edb24157c22a5a365de.tar.gz
Generate JavaDoc and source jar
Add the install task to publish to local M2 repository Change-Id: I1fd51172128ce617929d531f8aac7c757a724edc
-rw-r--r--build.gradle47
-rw-r--r--src/com/google/android/droiddriver/base/BaseUiDevice.java1
-rw-r--r--src/com/google/android/droiddriver/finders/By.java4
-rw-r--r--src/com/google/android/droiddriver/scroll/AccessibilityEventScrollStepStrategy.java2
-rw-r--r--src/com/google/android/droiddriver/scroll/Scrollers.java2
-rw-r--r--src/com/google/android/droiddriver/validators/DefaultAccessibilityValidator.java1
6 files changed, 53 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle
index 83ffff7..b5d6734 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,11 +8,19 @@ buildscript {
dependencies {
// this requires Gradle 2
classpath 'com.android.tools.build:gradle:1.0.1'
+ classpath 'com.github.dcendents:android-maven-plugin:1.2'
}
}
apply plugin: 'com.android.library'
+tasks.withType(JavaCompile) {
+ options.compilerArgs << "-Xlint:deprecation"
+}
+
+version = '1.0.0'
+group = 'io.appium'
+
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
@@ -20,6 +28,8 @@ android {
defaultConfig {
minSdkVersion 12 // TODO: need to support SDK 9?
targetSdkVersion 21
+ versionCode 1
+ versionName version
}
compileOptions {
@@ -34,3 +44,40 @@ android {
}
}
}
+
+apply plugin: 'com.github.dcendents.android-maven'
+
+install {
+ repositories.mavenInstaller {
+ pom {
+ project {
+ licenses {
+ license {
+ name 'The Apache Software License, Version 2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ }
+ }
+ }
+ }
+ }
+}
+
+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 javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+
+artifacts {
+ archives javadocJar
+ archives sourcesJar
+}
diff --git a/src/com/google/android/droiddriver/base/BaseUiDevice.java b/src/com/google/android/droiddriver/base/BaseUiDevice.java
index d7c5afa..9d5fdae 100644
--- a/src/com/google/android/droiddriver/base/BaseUiDevice.java
+++ b/src/com/google/android/droiddriver/base/BaseUiDevice.java
@@ -42,6 +42,7 @@ public abstract class BaseUiDevice implements UiDevice {
private static final SingleKeyAction POWER_ON = new SingleKeyAction(KeyEvent.KEYCODE_POWER,
0/* metaState */, 1000L/* timeoutMillis */, false);
+ @SuppressWarnings("deprecation")
@Override
public boolean isScreenOn() {
PowerManager pm =
diff --git a/src/com/google/android/droiddriver/finders/By.java b/src/com/google/android/droiddriver/finders/By.java
index 642b03d..1e3bc8a 100644
--- a/src/com/google/android/droiddriver/finders/By.java
+++ b/src/com/google/android/droiddriver/finders/By.java
@@ -159,7 +159,7 @@ public class By {
}
/**
- * Evaluates given {@finders} in short-circuit fashion in the order
+ * Evaluates given {@code finders} in short-circuit fashion in the order
* they are passed. Costly finders (for example those returned by with*
* methods that navigate the node tree) should be passed after cheap finders
* (for example the ByAttribute finders).
@@ -171,7 +171,7 @@ public class By {
}
/**
- * Evaluates given {@finders} in short-circuit fashion in the order
+ * Evaluates given {@code finders} in short-circuit fashion in the order
* they are passed. Costly finders (for example those returned by with*
* methods that navigate the node tree) should be passed after cheap finders
* (for example the ByAttribute finders).
diff --git a/src/com/google/android/droiddriver/scroll/AccessibilityEventScrollStepStrategy.java b/src/com/google/android/droiddriver/scroll/AccessibilityEventScrollStepStrategy.java
index 840685e..f3fe91d 100644
--- a/src/com/google/android/droiddriver/scroll/AccessibilityEventScrollStepStrategy.java
+++ b/src/com/google/android/droiddriver/scroll/AccessibilityEventScrollStepStrategy.java
@@ -41,7 +41,7 @@ import java.util.concurrent.TimeoutException;
* This implementation behaves just like the <a href=
* "http://developer.android.com/tools/help/uiautomator/UiScrollable.html"
* >UiScrollable</a> class. It may not work in all cases. For instance,
- * sometimes {@link android.support.v4.widget.DrawerLayout} does not send
+ * sometimes {@code android.support.v4.widget.DrawerLayout} does not send
* correct {@link AccessibilityEvent}s after scrolling.
* </p>
*/
diff --git a/src/com/google/android/droiddriver/scroll/Scrollers.java b/src/com/google/android/droiddriver/scroll/Scrollers.java
index 3459f0e..e95786f 100644
--- a/src/com/google/android/droiddriver/scroll/Scrollers.java
+++ b/src/com/google/android/droiddriver/scroll/Scrollers.java
@@ -31,7 +31,7 @@ import com.google.android.droiddriver.scroll.Direction.PhysicalDirection;
*/
public class Scrollers {
/**
- * Augments the delegate {@link ScrollStepStrategy) - after a successful
+ * Augments the delegate {@link ScrollStepStrategy} - after a successful
* scroll, waits until ProgressBar is gone.
*/
public static abstract class ProgressBarScrollStepStrategy extends ForwardingScrollStepStrategy {
diff --git a/src/com/google/android/droiddriver/validators/DefaultAccessibilityValidator.java b/src/com/google/android/droiddriver/validators/DefaultAccessibilityValidator.java
index a150c8f..4e9704a 100644
--- a/src/com/google/android/droiddriver/validators/DefaultAccessibilityValidator.java
+++ b/src/com/google/android/droiddriver/validators/DefaultAccessibilityValidator.java
@@ -56,6 +56,7 @@ public class DefaultAccessibilityValidator implements Validator {
return parent != null && parent.isScrollable();
}
+ @SuppressWarnings("deprecation")
private static boolean isActionableForAccessibility(UiElement element) {
if (element.isFocusable() || element.isClickable() || element.isLongClickable()) {
return true;