diff options
author | Xavier Ducrohet <xav@android.com> | 2012-12-06 18:39:20 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-12-06 18:47:57 -0800 |
commit | 88009b9d94e866da6ee83ecc2a7ffaac542d2ccf (patch) | |
tree | 63f6af51ad9d0a3bb339ad55fc1527deb972bec2 | |
parent | fe50887a23ba08e8e18a4a855a457473805da0b1 (diff) | |
download | sdk-88009b9d94e866da6ee83ecc2a7ffaac542d2ccf.zip sdk-88009b9d94e866da6ee83ecc2a7ffaac542d2ccf.tar.gz sdk-88009b9d94e866da6ee83ecc2a7ffaac542d2ccf.tar.bz2 |
Refactor testutils folder structure.
Move folders around to match default gradle/maven
folder structure.
The custom structure confused some IDEs when importing
the project as a Gradle project.
Change-Id: If78ff744392c76f94a1a76b33ca70a6f041a391e
-rw-r--r-- | testutils/.classpath | 3 | ||||
-rw-r--r-- | testutils/Android.mk | 17 | ||||
-rw-r--r-- | testutils/build.gradle | 18 | ||||
-rw-r--r-- | testutils/src/main/java/com/android/testutils/SdkTestCase.java (renamed from testutils/src/com/android/testutils/SdkTestCase.java) | 0 | ||||
-rw-r--r-- | testutils/src/test/.classpath | 9 | ||||
-rw-r--r-- | testutils/src/test/.project (renamed from testutils/tests/.project) | 0 | ||||
-rw-r--r-- | testutils/src/test/java/com/android/testutils/SdkTestCaseTest.java (renamed from testutils/tests/src/com/android/testutils/SdkTestCaseTest.java) | 0 | ||||
-rw-r--r-- | testutils/tests/.classpath | 9 | ||||
-rw-r--r-- | testutils/tests/Android.mk | 27 |
9 files changed, 26 insertions, 57 deletions
diff --git a/testutils/.classpath b/testutils/.classpath index 45f7edb..3134241 100644 --- a/testutils/.classpath +++ b/testutils/.classpath @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="tests/src"/> + <classpathentry kind="src" path="src/main/java"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> <classpathentry kind="var" path="ANDROID_SRC/prebuilts/tools/common/guava-tools/guava-13.0.1.jar" sourcepath="/ANDROID_SRC/prebuilts/tools/common/guava-tools/src.zip"/> diff --git a/testutils/Android.mk b/testutils/Android.mk index 2a1f6dc..42876f8 100644 --- a/testutils/Android.mk +++ b/testutils/Android.mk @@ -16,7 +16,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(call all-java-files-under,src) +LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java) LOCAL_JAR_MANIFEST := manifest.txt @@ -34,5 +34,16 @@ LOCAL_MODULE_TAGS := optional include $(BUILD_HOST_JAVA_LIBRARY) -# Build all sub-directories -include $(call all-makefiles-under,$(LOCAL_PATH)) +# Build tests + +include $(CLEAR_VARS) + +# Only compile source java files in this lib. +LOCAL_SRC_FILES := $(call all-java-files-under, src/main/java) + +LOCAL_MODULE := sdktestutils-tests +LOCAL_MODULE_TAGS := optional + +LOCAL_JAVA_LIBRARIES := common sdktestutils junit + +include $(BUILD_HOST_JAVA_LIBRARY) diff --git a/testutils/build.gradle b/testutils/build.gradle index 8ffc129..0726488 100644 --- a/testutils/build.gradle +++ b/testutils/build.gradle @@ -4,20 +4,6 @@ dependencies { } sourceSets { - main { - java { - srcDir 'src' - } - resources { - srcDir 'resources' - } - } - test { - java { - srcDir 'tests/src' - } - resources { - srcDir 'tests/resources' - } - } + main.resources.srcDir 'src/main/java' + test.resources.srcDir 'src/test/java' } diff --git a/testutils/src/com/android/testutils/SdkTestCase.java b/testutils/src/main/java/com/android/testutils/SdkTestCase.java index 6a4d54a..6a4d54a 100644 --- a/testutils/src/com/android/testutils/SdkTestCase.java +++ b/testutils/src/main/java/com/android/testutils/SdkTestCase.java diff --git a/testutils/src/test/.classpath b/testutils/src/test/.classpath new file mode 100644 index 0000000..271183e --- /dev/null +++ b/testutils/src/test/.classpath @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="java"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> + <classpathentry kind="var" path="ANDROID_SRC/prebuilts/tools/common/guava-tools/guava-13.0.1.jar" sourcepath="/ANDROID_SRC/prebuilts/tools/common/guava-tools/src.zip"/> + <classpathentry combineaccessrules="false" kind="src" path="/testutils"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/testutils/tests/.project b/testutils/src/test/.project index 3191084..3191084 100644 --- a/testutils/tests/.project +++ b/testutils/src/test/.project diff --git a/testutils/tests/src/com/android/testutils/SdkTestCaseTest.java b/testutils/src/test/java/com/android/testutils/SdkTestCaseTest.java index 9ab1a68..9ab1a68 100644 --- a/testutils/tests/src/com/android/testutils/SdkTestCaseTest.java +++ b/testutils/src/test/java/com/android/testutils/SdkTestCaseTest.java diff --git a/testutils/tests/.classpath b/testutils/tests/.classpath deleted file mode 100644 index 0ac1351..0000000 --- a/testutils/tests/.classpath +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> - <classpathentry combineaccessrules="false" kind="src" path="/sdktestutils"/> - <classpathentry kind="var" path="ANDROID_SRC/prebuilts/tools/common/guava-tools/guava-13.0.1.jar" sourcepath="/ANDROID_SRC/prebuilts/tools/common/guava-tools/src.zip"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/testutils/tests/Android.mk b/testutils/tests/Android.mk deleted file mode 100644 index e203ab4..0000000 --- a/testutils/tests/Android.mk +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2012 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -# Only compile source java files in this lib. -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_MODULE := sdktestutils-tests -LOCAL_MODULE_TAGS := optional - -LOCAL_JAVA_LIBRARIES := common sdktestutils junit - -include $(BUILD_HOST_JAVA_LIBRARY) |