diff --git a/Lab-Activity.docx b/Lab-Activity.docx new file mode 100644 index 0000000000000000000000000000000000000000..e6289b22f1e3f037bfc4fce440021c45d36dcb01 Binary files /dev/null and b/Lab-Activity.docx differ diff --git a/Lab-Activity.pdf b/Lab-Activity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2d5c06f79d16663edad71c10fe70a54ca8fafbe1 Binary files /dev/null and b/Lab-Activity.pdf differ diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..68fa06993699572b267a7de0265a61d52c808a3d --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,26 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 18 + buildToolsVersion "21.1.2" + + defaultConfig { + applicationId "course.labs.activitylab" + minSdkVersion 14 + targetSdkVersion 19 + + testApplicationId "course.labs.activitylab.tests" + testInstrumentationRunner "android.test.InstrumentationTestRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + } + } +} + +dependencies { + androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.3.1' +} diff --git a/app/libs/robotium-solo-5.3.1.jar b/app/libs/robotium-solo-5.3.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..d7f816c4c2bbc8d55b827b821fe13c8d55be4d08 Binary files /dev/null and b/app/libs/robotium-solo-5.3.1.jar differ diff --git a/app/src/androidTest/java/course/labs/activitylab/tests/Test1_StartActivityOneTest.java b/app/src/androidTest/java/course/labs/activitylab/tests/Test1_StartActivityOneTest.java new file mode 100644 index 0000000000000000000000000000000000000000..0fb55e5dfa47c05b673f9147d5ea23549f7f671d --- /dev/null +++ b/app/src/androidTest/java/course/labs/activitylab/tests/Test1_StartActivityOneTest.java @@ -0,0 +1,55 @@ +package course.labs.activitylab.tests; + +import android.test.ActivityInstrumentationTestCase2; + +import com.robotium.solo.Solo; + +import course.labs.activitylab.ActivityOne; + +public class Test1_StartActivityOneTest extends + ActivityInstrumentationTestCase2<ActivityOne> { + + private Solo solo; + private int timeout = 20000; + private int sleep = 1000; + + public Test1_StartActivityOneTest() { + super(ActivityOne.class); + } + + public void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + // Execution of StartActivityOneTest + public void testRun() { + + // ==================== Section One ===================== + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("StartActivityOneTest failed: " + "Section One:" + + "ActivityOne did not correctly load", solo.waitForActivity( + course.labs.activitylab.ActivityOne.class, timeout)); + + + // ==================== Section Two ===================== + // Check for proper counts + assertTrue("StartActivityOneTest failed:" + "Section Two:" + + "onCreate() count was off for ActivityOne", + solo.waitForText("onCreate\\(\\) calls: 1")); + assertTrue("StartActivityOneTest failed:" + "Section Two:" + + "onStart() count was off for ActivityOne", + solo.waitForText("onStart\\(\\) calls: 1")); + assertTrue("StartActivityOneTest failed:" + "Section Two:" + + "onResume() count was off for ActivityOne", + solo.waitForText("onResume\\(\\) calls: 1")); + assertTrue("StartActivityOneTest failed:" + "Section Two:" + + "onRestart() count was off for ActivityOne", + solo.waitForText("onRestart\\(\\) calls: 0")); + + } + +} diff --git a/app/src/androidTest/java/course/labs/activitylab/tests/Test2_DoubleRotateActivityOneTest.java b/app/src/androidTest/java/course/labs/activitylab/tests/Test2_DoubleRotateActivityOneTest.java new file mode 100644 index 0000000000000000000000000000000000000000..2c6dfb81cd56d9705997af0b297e2a18824a9134 --- /dev/null +++ b/app/src/androidTest/java/course/labs/activitylab/tests/Test2_DoubleRotateActivityOneTest.java @@ -0,0 +1,83 @@ +package course.labs.activitylab.tests; + +import android.test.ActivityInstrumentationTestCase2; + +import com.robotium.solo.Solo; + +import course.labs.activitylab.ActivityOne; + +public class Test2_DoubleRotateActivityOneTest extends + ActivityInstrumentationTestCase2<ActivityOne> { + + private Solo solo; + private int timeout = 20000; + private int sleep = 1000; + + public Test2_DoubleRotateActivityOneTest() { + super(ActivityOne.class); + } + + public void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + public void testRun() { + // ==================== Section One ===================== + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("DoubleRotateActivityOneTest failed: " + + "Section One:" + + "ActivityOne did not correctly load", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + + solo.sleep(sleep); + + // ==================== Section Two ===================== + // Rotate the screen + solo.setActivityOrientation(Solo.LANDSCAPE); + + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Two:" + + "ActivityOne did not correctly load after first LANDSCAPE rotation.", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + + solo.sleep(sleep); + + // ==================== Section Three ===================== + // Rotate the screen + solo.setActivityOrientation(Solo.PORTRAIT); + + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "ActivityOne did not correctly load after second PORTRAIT rotation.", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + solo.sleep(sleep); + + // Check for proper counts + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "onCreate() count was off for ActivityOne after second PORTRAIT rotation.", + solo.searchText("onCreate\\(\\) calls: 3")); + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "onStart() count was off for ActivityOne after second PORTRAIT rotation.", + solo.searchText("onStart\\(\\) calls: 3")); + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "onResume() count was off for ActivityOne after second PORTRAIT rotation.", + solo.searchText("onResume\\(\\) calls: 3")); + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "onRestart() count was off for ActivityOne after second PORTRAIT rotation.", + solo.searchText("onRestart\\(\\) calls: 0")); + } + +} diff --git a/app/src/androidTest/java/course/labs/activitylab/tests/Test2_DoubleRotateActivtyOneTest.java b/app/src/androidTest/java/course/labs/activitylab/tests/Test2_DoubleRotateActivtyOneTest.java new file mode 100644 index 0000000000000000000000000000000000000000..6f7ba270f13ac82f76f33e86086e334496188245 --- /dev/null +++ b/app/src/androidTest/java/course/labs/activitylab/tests/Test2_DoubleRotateActivtyOneTest.java @@ -0,0 +1,83 @@ +package course.labs.activitylab.tests; + +import android.test.ActivityInstrumentationTestCase2; + +import com.robotium.solo.Solo; + +import course.labs.activitylab.ActivityOne; + +public class Test2_DoubleRotateActivtyOneTest extends + ActivityInstrumentationTestCase2<ActivityOne> { + + private Solo solo; + private int timeout = 20000; + private int sleep = 1000; + + public Test2_DoubleRotateActivtyOneTest() { + super(ActivityOne.class); + } + + public void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + public void testRun() { + // ==================== Section One ===================== + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("DoubleRotateActivityOneTest failed: " + + "Section One:" + + "ActivityOne did not correctly load", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + + solo.sleep(sleep); + + // ==================== Section Two ===================== + // Rotate the screen + solo.setActivityOrientation(Solo.LANDSCAPE); + + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Two:" + + "ActivityOne did not correctly load after first LANDSCAPE rotation.", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + + solo.sleep(sleep); + + // ==================== Section Three ===================== + // Rotate the screen + solo.setActivityOrientation(Solo.PORTRAIT); + + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "ActivityOne did not correctly load after second PORTRAIT rotation.", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + solo.sleep(sleep); + + // Check for proper counts + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "onCreate() count was off for ActivityOne after second PORTRAIT rotation.", + solo.searchText("onCreate\\(\\) calls: 3")); + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "onStart() count was off for ActivityOne after second PORTRAIT rotation.", + solo.searchText("onStart\\(\\) calls: 3")); + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "onResume() count was off for ActivityOne after second PORTRAIT rotation.", + solo.searchText("onResume\\(\\) calls: 3")); + assertTrue("DoubleRotateActivityOneTest failed:" + + "Section Three:" + + "onRestart() count was off for ActivityOne after second PORTRAIT rotation.", + solo.searchText("onRestart\\(\\) calls: 0")); + } + +} diff --git a/app/src/androidTest/java/course/labs/activitylab/tests/Test3_StartActivityTwoTest.java b/app/src/androidTest/java/course/labs/activitylab/tests/Test3_StartActivityTwoTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c635a530817da3d5cef565ba63b7c57de290b0c8 --- /dev/null +++ b/app/src/androidTest/java/course/labs/activitylab/tests/Test3_StartActivityTwoTest.java @@ -0,0 +1,74 @@ +package course.labs.activitylab.tests; + +import android.test.ActivityInstrumentationTestCase2; + +import com.robotium.solo.Solo; + +import course.labs.activitylab.ActivityOne; + +public class Test3_StartActivityTwoTest extends ActivityInstrumentationTestCase2<ActivityOne> { + + private Solo solo; + private int timeout = 20000; + private int sleep = 1000; + + public Test3_StartActivityTwoTest() { + super(ActivityOne.class); + } + + protected void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + // Executes the StartActivityTwoTest + public void testRun() { + + // ==================== Section One ===================== + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("StartActivityTwoTest failed:" + + "Section One:" + + "ActivityOne did not load correctly", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + + // ==================== Section Two ===================== + // Click on Start Activity Two + + solo.waitForView(course.labs.activitylab.R.id.bLaunchActivityTwo); + solo.clickOnView(solo + .getView(course.labs.activitylab.R.id.bLaunchActivityTwo)); + + // Wait for activity: 'course.labs.activitylab.ActivityTwo' + assertTrue("StartActivityTwoTest failed:" + + "Section Two:" + + "ActivityTwo did not load correctly", + solo.waitForActivity(course.labs.activitylab.ActivityTwo.class, timeout)); + + + // Check for proper counts after ActivityTwo has been opened + assertTrue("StartActivityTwoTest failed:" + + "Section Two:" + + "onCreate() count was off for ActivityTwo.", + solo.waitForText("onCreate\\(\\) calls: 1")); + + assertTrue("StartActivityTwoTest failed:" + + "Section Two:" + + "onStart() count was off for ActivityTwo.", + solo.waitForText("onStart\\(\\) calls: 1")); + + assertTrue("StartActivityTwoTest failed:" + + "Section Two:" + + "onResume() count was off for ActivityTwo.", + solo.waitForText("onResume\\(\\) calls: 1")); + + assertTrue("StartActivityTwoTest failed:" + + "Section Two:" + + "onRestart() count was off for ActivityTwo.", + solo.waitForText("onRestart\\(\\) calls: 0")); + } + +} diff --git a/app/src/androidTest/java/course/labs/activitylab/tests/Test4_DoubleRotateActivityTwoTest.java b/app/src/androidTest/java/course/labs/activitylab/tests/Test4_DoubleRotateActivityTwoTest.java new file mode 100644 index 0000000000000000000000000000000000000000..2de3b2662221734047f298f15b4dbd71f4c66811 --- /dev/null +++ b/app/src/androidTest/java/course/labs/activitylab/tests/Test4_DoubleRotateActivityTwoTest.java @@ -0,0 +1,99 @@ +package course.labs.activitylab.tests; + +import android.test.ActivityInstrumentationTestCase2; + +import com.robotium.solo.Condition; +import com.robotium.solo.Solo; + +import course.labs.activitylab.ActivityOne; + +public class Test4_DoubleRotateActivityTwoTest extends ActivityInstrumentationTestCase2<ActivityOne> { + + private Solo solo; + private int timeout = 20000; + private int sleep = 1000; + + public Test4_DoubleRotateActivityTwoTest() { + super(ActivityOne.class); + } + + protected void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + // Exectues the DoubleRotateActivityTwoTest + public void testRun() { + // ==================== Section One ===================== + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("DoubleRotateActivityTwoTest failed:" + + "Section One:" + + "ActivityOne did not load correctly", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + + // ==================== Section Two ===================== + // Click on Start Activity Two + solo.waitForView(course.labs.activitylab.R.id.bLaunchActivityTwo); + solo.clickOnView(solo + .getView(course.labs.activitylab.R.id.bLaunchActivityTwo)); + + // Wait for activity: 'course.labs.activitylab.ActivityTwo' + assertTrue("DoubleRotateActivityTwoTest failed:" + + "Section Two:" + + "ActivityTwo did not load correctly", + solo.waitForActivity(course.labs.activitylab.ActivityTwo.class, timeout)); + + + solo.waitForView(course.labs.activitylab.R.id.bClose); + + // ==================== Section Three ===================== + // Rotate the screen + solo.setActivityOrientation(Solo.LANDSCAPE); + + // Wait for activity: 'course.labs.activitylab.ActivityTwo' + assertTrue("DoubleRotateActivityTwoTest failed:" + + "Section Three:" + + "ActivityTwo did not correctly load after first LANDSCAPE rotation.", + solo.waitForActivity(course.labs.activitylab.ActivityTwo.class, timeout)); + + solo.waitForView(course.labs.activitylab.R.id.bClose); + + // ==================== Section Four ===================== + // Rotate the screen + solo.setActivityOrientation(Solo.PORTRAIT); + + // Wait for activity: 'course.labs.activitylab.ActivityTwo' + assertTrue("DoubleRotateActivityTwoTest failed:" + + "Section Four:" + + "ActivityTwo did not correctly load after second PORTRAIT rotation.", + solo.waitForActivity(course.labs.activitylab.ActivityTwo.class, timeout)); + + solo.waitForView(course.labs.activitylab.R.id.bClose); + + // Check for proper counts + assertTrue("DoubleRotateActivityTwoTest failed:" + + "Section Four:" + + "onCreate() count was off for ActivityTwo after second PORTRAIT rotation.", + solo.waitForText("onCreate\\(\\) calls: 3")); + + assertTrue("DoubleRotateActivityTwoTest failed:" + + "Section Four:" + + "onStart() count was off for ActivityTwo after second PORTRAIT rotation.", + solo.waitForText("onStart\\(\\) calls: 3")); + + assertTrue("DoubleRotateActivityTwoTest failed:" + + "Section Four:" + + "onResume() count was off for ActivityTwo after second PORTRAIT rotation.", + solo.waitForText("onResume\\(\\) calls: 3")); + + assertTrue("DoubleRotateActivityTwoTest failed:" + + "Section Four:" + + "onRestart() count was off for ActivityTwo after second PORTRAIT rotation.", + solo.waitForText("onRestart\\(\\) calls: 0")); + } + +} diff --git a/app/src/androidTest/java/course/labs/activitylab/tests/Test5_CloseActivityTwoTest.java b/app/src/androidTest/java/course/labs/activitylab/tests/Test5_CloseActivityTwoTest.java new file mode 100644 index 0000000000000000000000000000000000000000..1753db58e776932aec3e9598ac5f48afd03b5c39 --- /dev/null +++ b/app/src/androidTest/java/course/labs/activitylab/tests/Test5_CloseActivityTwoTest.java @@ -0,0 +1,91 @@ +package course.labs.activitylab.tests; + +import android.test.ActivityInstrumentationTestCase2; + +import com.robotium.solo.Solo; + +import course.labs.activitylab.ActivityOne; + +public class Test5_CloseActivityTwoTest extends ActivityInstrumentationTestCase2<ActivityOne> { + + private Solo solo; + private int timeout = 20000; + private int sleep = 1000; + + public Test5_CloseActivityTwoTest() { + super(ActivityOne.class); + } + + protected void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + // Executes the CloseActivityTwoTest + public void testRun() { + + // ==================== Section One ===================== + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("CloseActivityTwoTest failed:" + + "Section One:" + + "ActivityOne did not load correctly", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + solo.waitForView(course.labs.activitylab.R.id.bLaunchActivityTwo); + + // ==================== Section Two ===================== + // Click on Start Activity Two + solo.clickOnView(solo.getView(course.labs.activitylab.R.id.bLaunchActivityTwo)); + + // Wait for activity: 'course.labs.activitylab.ActivityTwo' + assertTrue("CloseActivityTwoTest failed:" + + "Section Two:" + + "ActivityTwo did not load correctly", + solo.waitForActivity(course.labs.activitylab.ActivityTwo.class, timeout)); + + + // ==================== Section Three ===================== + // Click on Close Activity + + solo.waitForView(course.labs.activitylab.R.id.bClose); + + solo.sleep(sleep); + + solo.clickOnView(solo.getView(course.labs.activitylab.R.id.bClose)); + + + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("CloseActivityTwoTest failed:" + + "Section Three:" + + "ActivityTwo did not close correctly", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + solo.waitForView(course.labs.activitylab.R.id.bLaunchActivityTwo); + + // Check for proper counts + assertTrue("CloseActivityTwoTest failed:" + + "Section Three:" + + "onCreate() count was off for ActivityOne after ActivityTwo closed.", + solo.waitForText("onCreate\\(\\) calls: 1")); + + assertTrue("CloseActivityTwoTest failed:" + + "Section Three:" + + "onStart() count was off for ActivityOne after ActivityTwo closed.", + solo.waitForText("onStart\\(\\) calls: 2")); + + assertTrue("CloseActivityTwoTest failed:" + + "Section Three:" + + "onResume() count was off for ActivityOne after ActivityTwo closed.", + solo.waitForText("onResume\\(\\) calls: 2")); + + assertTrue("CloseActivityTwoTest failed:" + + "Section Three:" + + "onRestart() count was off for ActivityOne after ActivityTwo closed.", + solo.waitForText("onRestart\\(\\) calls: 1")); + + } + +} diff --git a/app/src/androidTest/java/course/labs/activitylab/tests/Test6_ReopenActivityTwoTest.java b/app/src/androidTest/java/course/labs/activitylab/tests/Test6_ReopenActivityTwoTest.java new file mode 100644 index 0000000000000000000000000000000000000000..dd3cef8246d1046a25dbde7f7e3d5168baf7f27f --- /dev/null +++ b/app/src/androidTest/java/course/labs/activitylab/tests/Test6_ReopenActivityTwoTest.java @@ -0,0 +1,103 @@ +package course.labs.activitylab.tests; + +import android.test.ActivityInstrumentationTestCase2; + +import com.robotium.solo.Solo; + +import course.labs.activitylab.ActivityOne; + +public class Test6_ReopenActivityTwoTest extends ActivityInstrumentationTestCase2<ActivityOne> { + + private Solo solo; + private int timeout = 20000; + private int sleep = 1000; + + public Test6_ReopenActivityTwoTest() { + super(ActivityOne.class); + } + + public void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + protected void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + // Executes the ReopenActivityTwoTest + public void testRun() { + + // ==================== Section One ===================== + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("ReopenActivityTwoTest failed:" + + "Section One:" + + "ActivityOne did not load correctly", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + solo.waitForView(course.labs.activitylab.R.id.bLaunchActivityTwo); + + // ==================== Section Two ===================== + // Click on Start Activity Two + solo.clickOnView(solo.getView(course.labs.activitylab.R.id.bLaunchActivityTwo)); + + // Wait for activity: 'course.labs.activitylab.ActivityTwo' + assertTrue("ReopenActivityTwoTest failed:" + + "Section Two:" + + "ActivityTwo did not load correctly", + solo.waitForActivity(course.labs.activitylab.ActivityTwo.class, timeout)); + + solo.waitForView(course.labs.activitylab.R.id.bClose); + + solo.sleep(sleep); + + // ==================== Section Three ===================== + // Click on Close Activity + solo.clickOnView(solo.getView(course.labs.activitylab.R.id.bClose)); + + // Wait for activity: 'course.labs.activitylab.ActivityOne' + assertTrue("ReopenActivityTwoTest failed:" + + "Section Three:" + + "ActivityTwo did not close correctly", + solo.waitForActivity(course.labs.activitylab.ActivityOne.class, timeout)); + + solo.waitForView(course.labs.activitylab.R.id.bLaunchActivityTwo); + + solo.sleep(sleep); + + // ==================== Section Four ===================== + // Click on Start Activity Two + solo.clickOnView(solo.getView(course.labs.activitylab.R.id.bLaunchActivityTwo)); + + // Wait for activity: 'course.labs.activitylab.ActivityTwo' + assertTrue("ReopenActivityTwoTest failed:" + + "Section Four:" + + "ActivityTwo did not reopen correctly after being closed", + solo.waitForActivity(course.labs.activitylab.ActivityTwo.class, timeout)); + + solo.waitForView(course.labs.activitylab.R.id.bClose); + + // Check for proper counts + assertTrue("ReopenActivityTwoTest failed:" + + "Section Four:" + + "onCreate() count was off for ActivityTwo after being reopened for a second time.", + solo.waitForText("onCreate\\(\\) calls: 1")); + + assertTrue("ReopenActivityTwoTest failed:" + + "Section Four:" + + "onStart() count was off for ActivityTwo after being reopened for a second time.", + solo.waitForText("onStart\\(\\) calls: 1")); + + assertTrue("ReopenActivityTwoTest failed:" + + "Section Four:" + + "onResume() count was off for ActivityTwo after being reopened for a second time.", + solo.waitForText("onResume\\(\\) calls: 1")); + + assertTrue("ReopenActivityTwoTest failed:" + + "Section Four:" + + "onRestart() count was off for ActivityTwo after being reopened for a second time.", + solo.waitForText("onRestart\\(\\) calls: 0")); + + + } + +} diff --git a/app/src/androidTest/res/.gitkeep b/app/src/androidTest/res/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..1c8a58e7a1c317c1a4cb08e78f45046a64e331bd --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="course.labs.activitylab" + android:versionCode="1" + android:versionName="1.0" > + + <uses-sdk + android:minSdkVersion="14" + android:targetSdkVersion="19" /> + + <application + android:allowBackup="true" + android:icon="@drawable/ic_launcher" + android:label="@string/app_name" + android:theme="@style/AppTheme" > + <activity + android:name=".ActivityOne" + android:label="@string/app_name" > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <activity + android:name=".ActivityTwo" + android:label="@string/title_activity_activity_two" > + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/app/src/main/java/course/labs/activitylab/ActivityOne.java b/app/src/main/java/course/labs/activitylab/ActivityOne.java new file mode 100644 index 0000000000000000000000000000000000000000..9e0eb5657e8fb23622ae0fe5ac03308156c0c7b9 --- /dev/null +++ b/app/src/main/java/course/labs/activitylab/ActivityOne.java @@ -0,0 +1,118 @@ +package course.labs.activitylab; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.TextView; + +public class ActivityOne extends Activity { + + // Use these as keys when you're saving state between reconfigurations + private static final String RESTART_KEY = "restart"; + private static final String RESUME_KEY = "resume"; + private static final String START_KEY = "start"; + private static final String CREATE_KEY = "create"; + + // String for LogCat documentation + private final static String TAG = "Lab-ActivityOne"; + + // Lifecycle counters + + // TODO: + // Create variables named + // mCreate, mRestart, mStart and mResume + // to count calls to onCreate(), onRestart(), onStart() and + // onResume(). These variables should not be defined as static. + + // You will need to increment these variables' values when their + // corresponding lifecycle methods get called. + + // TODO: Create variables for each of the TextViews + // named mTvCreate, mTvRestart, mTvStart, mTvResume. + // for displaying the current count of each counter variable + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_one); + + // TODO: Assign the appropriate TextViews to the TextView variables + // Hint: Access the TextView by calling Activity's findViewById() + // textView1 = (TextView) findViewById(R.id.textView1); + + Button launchActivityTwoButton = (Button) findViewById(R.id.bLaunchActivityTwo); + launchActivityTwoButton.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO: + // Launch Activity Two + // Hint: use Context's startActivity() method + + // Create an intent stating which Activity you would like to + // start + Intent intent = null; + + // Launch the Activity using the intent + + } + }); + + // Emit LogCat message using the Log.i method + + } + + + + @Override + public void onStart() { + super.onStart(); + + // Emit LogCat message using the Log.i method + } + + @Override + public void onResume() { + super.onResume(); + // Emit LogCat message using the Log.i method + } + + @Override + public void onPause() { + super.onPause(); + // Emit LogCat message using the Log.i method + } + + @Override + public void onStop() { + super.onStop(); + // Emit LogCat message using the Log.i method + } + + @Override + public void onRestart() { + super.onRestart(); + // Emit LogCat message using the Log.i method + + } + + @Override + public void onDestroy() { + super.onDestroy(); + // Emit LogCat message using the Log.i method + } + + @Override + public void onSaveInstanceState(Bundle savedInstanceState) { + + } + + + public void displayCounts() { + + } +} diff --git a/app/src/main/java/course/labs/activitylab/ActivityTwo.java b/app/src/main/java/course/labs/activitylab/ActivityTwo.java new file mode 100644 index 0000000000000000000000000000000000000000..742dc35b3b666fca1078a2e0351ffdb3fdc69b7c --- /dev/null +++ b/app/src/main/java/course/labs/activitylab/ActivityTwo.java @@ -0,0 +1,138 @@ +package course.labs.activitylab; + +import android.app.Activity; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.TextView; + +public class ActivityTwo extends Activity { + + // Use these as keys when you're saving state between reconfigurations + private static final String RESTART_KEY = "restart"; + private static final String RESUME_KEY = "resume"; + private static final String START_KEY = "start"; + private static final String CREATE_KEY = "create"; + + // String for LogCat documentation + private final static String TAG = "Lab-ActivityTwo"; + + // Lifecycle counters + + // TODO: + // Create variables named + // mCreate, mRestart, mStart and mResume + // to count calls to onCreate(), onRestart(), onStart() and + // onResume(). These variables should not be defined as static. + + // You will need to increment these variables' values when their + // corresponding lifecycle methods get called. + + + + + // TODO: Create variables for each of the TextViews + // named mTvCreate, mTvRestart, mTvStart, mTvResume. + // for displaying the current count of each counter variable + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_two); + + // TODO: Assign the appropriate TextViews to the TextView variables + // Hint: Access the TextView by calling Activity's findViewById() + // textView1 = (TextView) findViewById(R.id.textView1); + + + + + + + Button closeButton = (Button) findViewById(R.id.bClose); + closeButton.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + + // TODO: + // This function closes Activity Two + // Hint: use Context's finish() method + + + + } + }); + + // Has previous state been saved? + if (savedInstanceState != null) { + + // TODO: + // Restore value of counters from saved state + // Only need 4 lines of code, one for every count variable + + + + + + + } + + // Emit LogCat message using the Log.i method + } + + + + @Override + public void onStart() { + super.onStart(); + // Emit LogCat message using the Log.i method + } + + @Override + public void onResume() { + super.onResume(); + // Emit LogCat message using the Log.i method + + } + + @Override + public void onPause() { + super.onPause(); + // Emit LogCat message using the Log.i method + + } + + @Override + public void onStop() { + super.onStop(); + // Emit LogCat message using the Log.i method + } + + @Override + public void onRestart() { + super.onRestart(); + // Emit LogCat message using the Log.i method + } + + @Override + public void onDestroy() { + super.onDestroy(); + // Emit LogCat message using the Log.i method + } + + @Override + public void onSaveInstanceState(Bundle savedInstanceState) { + + + } + + + // specified above + public void displayCounts() { + + + } +} diff --git a/app/src/main/res/drawable-hdpi/ic_launcher.png b/app/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..0e79b184fcf8cc47dede6d7ccde00d1a1e2d9c23 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/drawable-ldpi/ic_launcher.png b/app/src/main/res/drawable-ldpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..ebfac7d78b9e17c113f734d10af74bd2b100beba Binary files /dev/null and b/app/src/main/res/drawable-ldpi/ic_launcher.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_launcher.png b/app/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..1183441937efcae0151b75099bec444d034886e9 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_launcher.png b/app/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c8ab2a114716b712ec0c5122f9e9524afaa60b52 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/layout/activity_one.xml b/app/src/main/res/layout/activity_one.xml new file mode 100644 index 0000000000000000000000000000000000000000..a9fa450b39204a1629ee380d7e294982b846004a --- /dev/null +++ b/app/src/main/res/layout/activity_one.xml @@ -0,0 +1,32 @@ +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" > + + <TextView android:id="@+id/create" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/onCreate" /> + + <TextView android:id="@+id/start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/onStart" /> + + <TextView android:id="@+id/resume" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/onResume" /> + + <TextView android:id="@+id/restart" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/onRestart" /> + + <Button android:id="@+id/bLaunchActivityTwo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/button" /> + +</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_two.xml b/app/src/main/res/layout/activity_two.xml new file mode 100644 index 0000000000000000000000000000000000000000..a9542de2a72162d321bb99adfb85b6989377671f --- /dev/null +++ b/app/src/main/res/layout/activity_two.xml @@ -0,0 +1,33 @@ +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" > + + <TextView android:id="@+id/create" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/onCreate" /> + + <TextView android:id="@+id/start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/onStart" /> + + <TextView android:id="@+id/resume" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/onResume" /> + + <TextView android:id="@+id/restart" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/onRestart" /> + + <Button android:id="@+id/bClose" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/close" + /> + +</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/values-v11/styles.xml b/app/src/main/res/values-v11/styles.xml new file mode 100644 index 0000000000000000000000000000000000000000..541752f6edf47a27cad70a23c00cc17aa4c84c08 --- /dev/null +++ b/app/src/main/res/values-v11/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- + Base application theme for API 11+. This theme completely replaces + AppBaseTheme from res/values/styles.xml on API 11+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> + <!-- API 11 theme customizations can go here. --> + </style> + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-v14/styles.xml b/app/src/main/res/values-v14/styles.xml new file mode 100644 index 0000000000000000000000000000000000000000..f20e01501dfde7d1f4cc9c29f85169ce57bc5846 --- /dev/null +++ b/app/src/main/res/values-v14/styles.xml @@ -0,0 +1,12 @@ +<resources> + + <!-- + Base application theme for API 14+. This theme completely replaces + AppBaseTheme from BOTH res/values/styles.xml and + res/values-v11/styles.xml on API 14+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> + <!-- API 14 theme customizations can go here. --> + </style> + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea863b3e7ee7c735bac513ce6078c5b25046b05f --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string name="app_name">ActivityLab</string> + <string name="onCreate">onCreate() calls: 0</string> + <string name="onStart">onStart() calls: 0</string> + <string name="onResume">onResume() calls: 0</string> + <string name="onRestart">onRestart() calls: 0</string> + <string name="button">Start Activity Two</string> + <string name="title_activity_activity_two">Activity Two</string> + <string name="close">Close Activity</string> + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000000000000000000000000000000000..4a10ca492dd2610011d3979b4dc551f471fa27ab --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,20 @@ +<resources> + + <!-- + Base application theme, dependent on API level. This theme is replaced + by AppBaseTheme from res/values-vXX/styles.xml on newer devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Light"> + <!-- + Theme customizations available in newer API levels can go in + res/values-vXX/styles.xml, while customizations related to + backward-compatibility can go here. + --> + </style> + + <!-- Application theme. --> + <style name="AppTheme" parent="AppBaseTheme"> + <!-- All customizations that are NOT specific to a particular API-level can go here. --> + </style> + +</resources> \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..88d246d44a63a396e634c6ea68f88d57e9489e98 --- /dev/null +++ b/build.gradle @@ -0,0 +1,15 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.2.3' + } +} + +allprojects { + repositories { + jcenter() + } +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..8c0fb64a8698b08ecc4158d828ca593c4928e9dd Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..0c71e760dc93830dd3411fe50d6f5c86bf0a8f4d --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed Apr 10 15:27:10 PDT 2013 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip diff --git a/gradlew b/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..91a7e269e19dfc62e27137a0b57ef3e430cee4fd --- /dev/null +++ b/gradlew @@ -0,0 +1,164 @@ +#!/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/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..8a0b282aa6885fb573c106b3551f7275c5f17e8e --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@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/settings.gradle b/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..e7b4def49cb53d9aa04228dd3edb14c9e635e003 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +include ':app'