Skip to content
Snippets Groups Projects
Commit ae6ae8f1 authored by Kevin Jin's avatar Kevin Jin
Browse files

Remove Android.mk files

Update manualtest/build.gradle for new Gradle plugin

Change-Id: I447802519ce738fb2c5063b9a68ad871106e40b1
parent 3d5506fe
No related branches found
No related tags found
No related merge requests found
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := droiddriver
LOCAL_MODULE_TAGS := optional
LOCAL_SDK_VERSION := 19
# Workaround for http://b/27584859
LOCAL_JAVA_LANGUAGE_VERSION := 1.8
LOCAL_JAVACFLAGS += -Xlint:deprecation -Xlint:unchecked
include $(BUILD_STATIC_JAVA_LIBRARY)
include $(CLEAR_VARS)
include $(call all-makefiles-under,$(LOCAL_PATH))
......@@ -2,7 +2,6 @@
// sdk.dir for the Android SDK path, you can run
// $ ANDROID_HOME=/path/to/android-sdk gradle build
// Gradle >= 2.4 required
buildscript {
ext.bintrayUser = project.hasProperty('bintrayUser') ? project.bintrayUser : System.getenv('BINTRAY_USER')
ext.bintrayKey = project.hasProperty('bintrayKey') ? project.bintrayKey : System.getenv('BINTRAY_KEY')
......@@ -12,7 +11,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
if (bintrayEnabled) {
......@@ -30,7 +29,7 @@ apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.library'
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:deprecation'
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
}
android {
......
......@@ -6,18 +6,13 @@ The [`master` branch](https://github.com/appium/droiddriver/tree/master) on GitH
Code changes should be [submitted to AOSP](contributing_aosp.md) and then they'll be synced to GitHub once they've passed code reivew on Gerrit.
#### Requirements
#### Build
Gradle 2.2.1 or better is required to be installed on the system. In Android Studio, you'll need to provide the gradle location.
On Mac OSX with homebrew, `brew install gradle` will install gradle. To locate the path, use `brew info gradle` The homebrew path follows this format: `/usr/local/Cellar/gradle/2.2.1/libexec`
If you installed gradle using the zip (`gradle-2.2.1-bin.zip`), then the path will be the `gradle-2.2.1` folder.
`./gradlew build`
#### Import into Android Studio
- Clone from git
- Launch Android Studio and select `Open an existing Android Studio project`
- Navigate to `droiddriver/build.gradle` and press Choose
- Select `Use local gradle distribution` and enter the Gradle path
- Android Studio will now import the project successfully
......@@ -16,9 +16,12 @@ $ repo sync
```
The code should be downloaded to the current dir. You may see some lines in the output like:
curl: (22) The requested URL returned error: 401 Unauthorized
`curl: (22) The requested URL returned error: 401 Unauthorized`
These messages seem non-fatal and you should see these dirs after it is done:
build/ external/ frameworks/ Makefile prebuilts/
`build/ external/ frameworks/ Makefile prebuilts/`
#### Submitting Patches
......@@ -51,16 +54,3 @@ When commenting on the code, posts will show up as drafts. Drafts are not visibl
- `repo upload`
The [`repo prune`](https://source.android.com/source/using-repo.html) command can be used to delete already merged branches.
#### Building
This sets up environment and some bash functions, particularly "tapas"
(the counterpart of "lunch" for unbundled projects) and "m".
```bash
$ . build/envsetup.sh
$ tapas droiddriver ManualDD
$ m
```
ManualDD is an APK you can use to manually test DroidDriver.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := droiddriver-android_support_test
LOCAL_MODULE_TAGS := optional
LOCAL_SDK_VERSION := 19
LOCAL_JAVACFLAGS += -Xlint:deprecation -Xlint:unchecked
# android-support-test requires /frameworks/testing, /external/junit, /external/hamcrest
LOCAL_JAVA_LIBRARIES := droiddriver android-support-test
include $(BUILD_STATIC_JAVA_LIBRARY)
include $(CLEAR_VARS)
include $(call all-makefiles-under,$(LOCAL_PATH))
......@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
// this requires Gradle 2
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
}
}
......
#Tue Mar 08 10:10:54 PST 2016
#Mon Mar 14 09:50:19 PDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := ManualDD
LOCAL_MODULE_TAGS := optional
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SRC_FILES := \
$(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
droiddriver
LOCAL_SDK_VERSION := 19
include $(BUILD_PACKAGE)
......@@ -3,8 +3,7 @@ buildscript {
jcenter()
}
dependencies {
// this requires Gradle 2
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
......@@ -14,15 +13,11 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
minSdkVersion 8
targetSdkVersion 21
// Force remove the suffix '.test'
testApplicationId 'io.appium.droiddriver.manualtest'
testInstrumentationRunner 'io.appium.droiddriver.runner.TestRunner'
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
......@@ -31,6 +26,8 @@ android {
java.srcDirs = ['src']
}
}
productFlavors {
}
}
// Building with droiddriver source. Common tests should use droiddriver from jcenter by having
......@@ -39,7 +36,7 @@ android {
// jcenter()
// }
// dependencies {
// androidTestCompile 'io.appium:droiddriver:0.9.1-BETA' // or another version
// androidTestCompile 'io.appium:droiddriver:1.0.0-BETA1' // or another version
// }
dependencies {
androidTestCompile project(':droiddriver')
......
......@@ -16,10 +16,10 @@ import io.appium.droiddriver.uiautomation.UiAutomationDriver;
* {@link #testSetTextForPassword} assumes the password_edit field is displayed
* on screen.
* <p>
* Run it as (optionally with -e debug true)
* Run it with
*
* <pre>
* adb shell am instrument -w io.appium.droiddriver.manualtest/io.appium.droiddriver.runner.TestRunner
* ../gradlew :connectedAndroidTest
* </pre>
*/
public class ManualTest extends BaseDroidDriverTest<Activity> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment