From ec985147ec781dfff9a229c6b794ee4eac0ced91 Mon Sep 17 00:00:00 2001 From: Trevor Johns Date: Wed, 30 Oct 2013 21:57:35 +0000 Subject: Revert "Merge downstream branch 'developers-dev' into 'klp-dev'" Undoing recent merge to get a clean klp-dev samples release without template code. Will un-revert for followup release with templates after that build has been cut. This reverts commit bc6fe0f65025563ab50af193b099a8fca95ff0a2. Change-Id: Icd2b9772986de7c4978a92e7e22bb2c2cef20bd0 --- .../ActivityInstrumentationSample/.gitignore | 16 -- .../proguard-project.txt | 20 --- .../src/main/AndroidManifest.xml | 42 ------ .../activityinstrumentation/MainActivity.java | 110 -------------- .../src/main/res/drawable-hdpi/ic_launcher.png | Bin 4199 -> 0 bytes .../src/main/res/drawable-mdpi/ic_launcher.png | Bin 2535 -> 0 bytes .../src/main/res/drawable-xhdpi/ic_launcher.png | Bin 6022 -> 0 bytes .../src/main/res/drawable-xxhdpi/ic_launcher.png | Bin 11040 -> 0 bytes .../src/main/res/layout/sample_main.xml | 41 ------ .../src/main/res/values-sw720dp-land/dimens.xml | 21 --- .../src/main/res/values/dimens.xml | 22 --- .../src/main/res/values/strings.xml | 20 --- .../tests/AndroidManifest.xml | 42 ------ .../activityinstrumentation/SampleTests.java | 122 --------------- testing/ActivityInstrumentation/build.gradle | 10 -- .../ActivityInstrumentation/buildSrc/build.gradle | 18 --- .../gradle/wrapper/gradle-wrapper.jar | Bin 49896 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 - testing/ActivityInstrumentation/gradlew | 164 --------------------- testing/ActivityInstrumentation/gradlew.bat | 90 ----------- testing/ActivityInstrumentation/settings.gradle | 4 - .../ActivityInstrumentation/template-params.xml | 39 ----- .../AndroidManifest.xml | 45 ++++++ .../proguard-project.txt | 20 +++ .../res/drawable-hdpi/ic_launcher.png | Bin 0 -> 9397 bytes .../res/drawable-ldpi/ic_launcher.png | Bin 0 -> 2729 bytes .../res/drawable-mdpi/ic_launcher.png | Bin 0 -> 5237 bytes .../res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 14383 bytes .../res/layout/activity_main.xml | 41 ++++++ .../res/values-sw720dp-land/dimens.xml | 21 +++ .../res/values-v11/styles.xml | 28 ++++ .../res/values-v14/styles.xml | 29 ++++ .../res/values/dimens.xml | 22 +++ .../res/values/strings.xml | 21 +++ .../res/values/styles.xml | 37 +++++ .../activityinstrumentation/MainActivity.java | 110 ++++++++++++++ .../tests/AndroidManifest.xml | 37 +++++ .../tests/proguard-project.txt | 20 +++ .../activityinstrumentation/MainActivityTest.java | 119 +++++++++++++++ 39 files changed, 550 insertions(+), 787 deletions(-) delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/layout/sample_main.xml delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values-sw720dp-land/dimens.xml delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/dimens.xml delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml delete mode 100644 testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java delete mode 100644 testing/ActivityInstrumentation/build.gradle delete mode 100644 testing/ActivityInstrumentation/buildSrc/build.gradle delete mode 100644 testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar delete mode 100644 testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties delete mode 100755 testing/ActivityInstrumentation/gradlew delete mode 100644 testing/ActivityInstrumentation/gradlew.bat delete mode 100644 testing/ActivityInstrumentation/settings.gradle delete mode 100644 testing/ActivityInstrumentation/template-params.xml create mode 100644 testing/ActivityInstrumentationSample/AndroidManifest.xml create mode 100644 testing/ActivityInstrumentationSample/proguard-project.txt create mode 100644 testing/ActivityInstrumentationSample/res/drawable-hdpi/ic_launcher.png create mode 100644 testing/ActivityInstrumentationSample/res/drawable-ldpi/ic_launcher.png create mode 100644 testing/ActivityInstrumentationSample/res/drawable-mdpi/ic_launcher.png create mode 100644 testing/ActivityInstrumentationSample/res/drawable-xhdpi/ic_launcher.png create mode 100644 testing/ActivityInstrumentationSample/res/layout/activity_main.xml create mode 100644 testing/ActivityInstrumentationSample/res/values-sw720dp-land/dimens.xml create mode 100644 testing/ActivityInstrumentationSample/res/values-v11/styles.xml create mode 100644 testing/ActivityInstrumentationSample/res/values-v14/styles.xml create mode 100644 testing/ActivityInstrumentationSample/res/values/dimens.xml create mode 100644 testing/ActivityInstrumentationSample/res/values/strings.xml create mode 100644 testing/ActivityInstrumentationSample/res/values/styles.xml create mode 100644 testing/ActivityInstrumentationSample/src/com/example/android/activityinstrumentation/MainActivity.java create mode 100644 testing/ActivityInstrumentationSample/tests/AndroidManifest.xml create mode 100644 testing/ActivityInstrumentationSample/tests/proguard-project.txt create mode 100644 testing/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/MainActivityTest.java (limited to 'testing') diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore b/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore deleted file mode 100644 index 6eb878d4..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2013 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. -src/template/ -src/common/ -build.gradle diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt b/testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt deleted file mode 100644 index 0d8f171d..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ - To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml deleted file mode 100644 index 547d95ee..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java deleted file mode 100644 index 39056eaa..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2013 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. - */ - -package com.example.android.activityinstrumentation; - -import android.app.Activity; -import android.content.SharedPreferences; -import android.os.Bundle; -import android.preference.PreferenceManager; -import android.view.View; -import android.widget.AdapterView; -import android.widget.ArrayAdapter; -import android.widget.Spinner; - -import java.util.ArrayList; -import java.util.Arrays; - -/** - * Basic activity with a spinner. The spinner should persist its position to disk every time a - * new selection is made. - */ -public class MainActivity extends Activity { - - /** Shared preferences key: Holds spinner position. Must not be negative. */ - private static final String PREF_SPINNER_POS = "spinner_pos"; - /** Magic constant to indicate that no value is stored for PREF_SPINNER_POS. */ - private static final int PREF_SPINNER_VALUE_ISNULL = -1; - /** Values for display in spinner. */ - private static final String[] SPINNER_VALUES = new String[] { - "Select Weather...", "Sunny", "Partly Cloudy", "Cloudy", "Rain", "Snow", "Hurricane"}; - - // Constants representing each of the options in SPINNER_VALUES. Declared package-private - // so that they can be accessed from our test suite. - static final int WEATHER_NOSELECTION = 0; - static final int WEATHER_SUNNY = 1; - static final int WEATHER_PARTLY_CLOUDY = 2; - static final int WEATHER_CLOUDY = 3; - static final int WEATHER_RAIN = 4; - static final int WEATHER_SNOW = 5; - static final int WEATHER_HURRICANE = 6; - - /** Handle to default shared preferences for this activity. */ - private SharedPreferences mPrefs; - /** Handle to the spinner in this Activity's layout. */ - private Spinner mSpinner; - - /** - * Setup activity state. - * - * @param savedInstanceState - */ - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - // Inflate UI from res/layout/activity_main.xml - setContentView(R.layout.sample_main); - - // Get handle to default shared preferences for this activity - mPrefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - - // Populate spinner with sample values from an array - mSpinner = (Spinner) findViewById(R.id.spinner); - mSpinner.setAdapter( - new ArrayAdapter( - this, // Context - android.R.layout.simple_list_item_1, // Layout - new ArrayList(Arrays.asList(SPINNER_VALUES)) // Data source - )); - - // Read in a sample value, if it's not set. - int selection = mPrefs.getInt(PREF_SPINNER_POS, PREF_SPINNER_VALUE_ISNULL); - if (selection != PREF_SPINNER_VALUE_ISNULL) { - mSpinner.setSelection(selection); - } - - // Callback to persist spinner data whenever a new value is selected. This will be the - // focus of our sample unit test. - mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { - - // The methods below commit the ID of the currently selected item in the spinner - // to disk, using a SharedPreferences file. - // - // Note: A common mistake here is to forget to call .commit(). Try removing this - // statement and running the tests to watch them fail. - @Override - public void onItemSelected(AdapterView parent, View view, int position, long id) { - mPrefs.edit().putInt(PREF_SPINNER_POS, position).commit(); - } - - @Override - public void onNothingSelected(AdapterView parent) { - mPrefs.edit().remove(PREF_SPINNER_POS).commit(); - } - }); - } -} diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index b1efaf4b..00000000 Binary files a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index f5f9244f..00000000 Binary files a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index 5d07b3f0..00000000 Binary files a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100644 index 6ef21e1f..00000000 Binary files a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/layout/sample_main.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/layout/sample_main.xml deleted file mode 100644 index 2b7a4d16..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/layout/sample_main.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values-sw720dp-land/dimens.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values-sw720dp-land/dimens.xml deleted file mode 100644 index 0dfce6a0..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values-sw720dp-land/dimens.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - 128dp - diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/dimens.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/dimens.xml deleted file mode 100644 index 4afc9dd1..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/dimens.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - 16dp - 16dp - diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml deleted file mode 100644 index 4ed22434..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - The value of the spinner below should be persisted when this activity is destroyed. - diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml deleted file mode 100644 index ad20a2a1..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java b/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java deleted file mode 100644 index 3be18673..00000000 --- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2013 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. - */ - -package com.example.android.activityinstrumentation; - -import android.app.Activity; -import android.test.ActivityInstrumentationTestCase2; -import android.widget.Spinner; - -import com.example.android.activityinstrumentation.MainActivity; -import com.example.android.activityinstrumentation.R; - -/** - * This is a simple framework for a test of an Application. See - * {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on - * how to write and extend Application tests. - * - *

To run this test, you can type: - * adb shell am instrument -w \ - * -e class com.example.android.activityinstrumentation.MainActivityTest \ - * quux.tests/android.test.InstrumentationTestRunner - * - *

Individual tests are defined as any method beginning with 'test'. - * - *

ActivityInstrumentationTestCase2 allows these tests to run alongside a running - * copy of the application under inspection. Calling getActivity() will return a - * handle to this activity (launching it if needed). - */ -public class SampleTests extends ActivityInstrumentationTestCase2 { - - public SampleTests() { - super("com.example.android.activityinstrumentation", MainActivity.class); - } - - /** - * Test to make sure that spinner values are persisted across activity restarts. - * - *

Launches the main activity, sets a spinner value, closes the activity, then relaunches - * that activity. Checks to make sure that the spinner values match what we set them to. - */ - // BEGIN_INCLUDE (test_name) - public void testSpinnerValuePersistedBetweenLaunches() { - // END_INCLUDE (test_name) - final int TEST_SPINNER_POSITION_1 = MainActivity.WEATHER_PARTLY_CLOUDY; - - // BEGIN_INCLUDE (launch_activity) - // Launch the activity - Activity activity = getActivity(); - // END_INCLUDE (launch_activity) - - // BEGIN_INCLUDE (write_to_ui) - // Set spinner to test position 1 - final Spinner spinner1 = (Spinner) activity.findViewById(R.id.spinner); - activity.runOnUiThread(new Runnable() { - @Override - public void run() { - // Attempts to manipulate the UI must be performed on a UI thread. - // Calling this outside runOnUiThread() will cause an exception. - // - // You could also use @UiThreadTest, but activity lifecycle methods - // cannot be called if this annotation is used. - spinner1.requestFocus(); - spinner1.setSelection(TEST_SPINNER_POSITION_1); - } - }); - // END_INCLUDE (write_to_ui) - - // BEGIN_INCLUDE (relaunch_activity) - // Close the activity - activity.finish(); - setActivity(null); // Required to force creation of a new activity - - // Relaunch the activity - activity = this.getActivity(); - // END_INCLUDE (relaunch_activity) - - // BEGIN_INCLUDE (check_results) - // Verify that the spinner was saved at position 1 - final Spinner spinner2 = (Spinner) activity.findViewById(R.id.spinner); - int currentPosition = spinner2.getSelectedItemPosition(); - assertEquals(TEST_SPINNER_POSITION_1, currentPosition); - // END_INCLUDE (check_results) - - // Since this is a stateful test, we need to make sure that the activity isn't simply - // echoing a previously-stored value that (coincidently) matches position 1 - final int TEST_SPINNER_POSITION_2 = MainActivity.WEATHER_SNOW; - - // Set spinner to test position 2 - activity.runOnUiThread(new Runnable() { - @Override - public void run() { - spinner2.requestFocus(); - spinner2.setSelection(TEST_SPINNER_POSITION_2); - } - }); - - // Close the activity - activity.finish(); - setActivity(null); - - // Relaunch the activity - activity = this.getActivity(); - - // Verify that the spinner was saved at position 2 - final Spinner spinner3 = (Spinner) activity.findViewById(R.id.spinner); - currentPosition = spinner3.getSelectedItemPosition(); - assertEquals(TEST_SPINNER_POSITION_2, currentPosition); - } -} diff --git a/testing/ActivityInstrumentation/build.gradle b/testing/ActivityInstrumentation/build.gradle deleted file mode 100644 index c7a137e4..00000000 --- a/testing/ActivityInstrumentation/build.gradle +++ /dev/null @@ -1,10 +0,0 @@ -// BEGIN_EXCLUDE -import com.example.android.samples.build.SampleGenPlugin -apply plugin: SampleGenPlugin - -samplegen { - pathToBuild "../../../../build" - pathToSamplesCommon "../../common" -} -apply from: "../../../../build/build.gradle" -// END_EXCLUDE diff --git a/testing/ActivityInstrumentation/buildSrc/build.gradle b/testing/ActivityInstrumentation/buildSrc/build.gradle deleted file mode 100644 index 29282af4..00000000 --- a/testing/ActivityInstrumentation/buildSrc/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ - - - -repositories { - mavenCentral() -} -dependencies { - compile 'org.freemarker:freemarker:2.3.20' -} - -sourceSets { - main { - groovy { - srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy") - } - } -} - diff --git a/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar b/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 8c0fb64a..00000000 Binary files a/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties b/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 5c22dec0..00000000 --- a/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Apr 10 15:27:10 PDT 2013 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip diff --git a/testing/ActivityInstrumentation/gradlew b/testing/ActivityInstrumentation/gradlew deleted file mode 100755 index 91a7e269..00000000 --- a/testing/ActivityInstrumentation/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - 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=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/testing/ActivityInstrumentation/gradlew.bat b/testing/ActivityInstrumentation/gradlew.bat deleted file mode 100644 index aec99730..00000000 --- a/testing/ActivityInstrumentation/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz 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. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -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 - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/testing/ActivityInstrumentation/settings.gradle b/testing/ActivityInstrumentation/settings.gradle deleted file mode 100644 index 0f010ba2..00000000 --- a/testing/ActivityInstrumentation/settings.gradle +++ /dev/null @@ -1,4 +0,0 @@ - - - -include 'ActivityInstrumentationSample' diff --git a/testing/ActivityInstrumentation/template-params.xml b/testing/ActivityInstrumentation/template-params.xml deleted file mode 100644 index 4856a82d..00000000 --- a/testing/ActivityInstrumentation/template-params.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - ActivityInstrumentation - Testing - com.example.android.com.example.android.activityinstrumentation - - - - 4 - - - - - - - - -