From 3aa6f80eec4e922add92646a5d5547b6db82cc4b Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Wed, 18 Sep 2019 15:10:24 +0200 Subject: Move gradle-integration-tests to new module --- .../androidApp/app/src/main/AndroidManifest.xml | 26 ++++++++++++++++ .../org/example/kotlin/mixed/JavaActivity.java | 34 +++++++++++++++++++++ .../org/example/kotlin/mixed/KotlinActivity.kt | 28 +++++++++++++++++ .../app/src/main/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 9397 bytes .../app/src/main/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 5237 bytes .../src/main/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 14383 bytes .../app/src/main/res/layout/activity_main.xml | 24 +++++++++++++++ .../app/src/main/res/layout/activity_main2.xml | 24 +++++++++++++++ .../androidApp/app/src/main/res/menu/main.xml | 6 ++++ .../app/src/main/res/menu/main_activity2.xml | 6 ++++ .../androidApp/app/src/main/res/values/dimens.xml | 5 +++ .../androidApp/app/src/main/res/values/strings.xml | 10 ++++++ .../androidApp/app/src/main/res/values/styles.xml | 20 ++++++++++++ 13 files changed, 183 insertions(+) create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/AndroidManifest.xml create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/java/org/example/kotlin/mixed/JavaActivity.java create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/kotlin/org/example/kotlin/mixed/KotlinActivity.kt create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-hdpi/ic_launcher.png create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-mdpi/ic_launcher.png create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-xhdpi/ic_launcher.png create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/layout/activity_main.xml create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/layout/activity_main2.xml create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/menu/main.xml create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/menu/main_activity2.xml create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/dimens.xml create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/strings.xml create mode 100644 integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/styles.xml (limited to 'integration-tests/gradle-integration-tests/testData/androidApp/app/src/main') diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/AndroidManifest.xml b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..b4e1a892 --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/java/org/example/kotlin/mixed/JavaActivity.java b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/java/org/example/kotlin/mixed/JavaActivity.java new file mode 100644 index 00000000..3668c594 --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/java/org/example/kotlin/mixed/JavaActivity.java @@ -0,0 +1,34 @@ +package org.example.kotlin.mixed; + +import android.content.Intent; +import android.os.Bundle; +import android.app.Activity; +import android.view.Menu; +import android.view.View; +import android.widget.Button; + +public class JavaActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Button next = (Button) findViewById(R.id.Button01); + next.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Intent myIntent = new Intent(view.getContext(), KotlinActivity.class); + startActivityForResult(myIntent, 0); + } + }); + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.main, menu); + return true; + } + +} diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/kotlin/org/example/kotlin/mixed/KotlinActivity.kt b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/kotlin/org/example/kotlin/mixed/KotlinActivity.kt new file mode 100644 index 00000000..ca2f27b0 --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/kotlin/org/example/kotlin/mixed/KotlinActivity.kt @@ -0,0 +1,28 @@ +package org.example.kotlin.mixed + +import android.content.Intent +import android.os.Bundle +import android.app.Activity +import android.view.Menu +import android.widget.Button + +class KotlinActivity : Activity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main2) + + val next = findViewById(R.id.Button02) as Button + next.setOnClickListener { + val intent: Intent = Intent() + setResult(RESULT_OK, intent) + finish() + } + } + + override fun onCreateOptionsMenu(menu: Menu?): Boolean { + // Inflate the menu; this adds items to the action bar if it is present. + menuInflater.inflate(R.menu.main_activity2, menu) + return true + } +} diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-hdpi/ic_launcher.png b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 00000000..96a442e5 Binary files /dev/null and b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-mdpi/ic_launcher.png b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 00000000..359047df Binary files /dev/null and b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-xhdpi/ic_launcher.png b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 00000000..71c6d760 Binary files /dev/null and b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/layout/activity_main.xml b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..ede57c39 --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,24 @@ + + + + + + + diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/layout/activity_main2.xml b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/layout/activity_main2.xml new file mode 100644 index 00000000..d707536a --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/layout/activity_main2.xml @@ -0,0 +1,24 @@ + + + + + + + diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/menu/main.xml b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/menu/main.xml new file mode 100644 index 00000000..f3b10b6c --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/menu/main.xml @@ -0,0 +1,6 @@ + + + diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/menu/main_activity2.xml b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/menu/main_activity2.xml new file mode 100644 index 00000000..f3b10b6c --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/menu/main_activity2.xml @@ -0,0 +1,6 @@ + + + diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/dimens.xml b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/dimens.xml new file mode 100644 index 00000000..47c82246 --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ + + + 16dp + 16dp + diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/strings.xml b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..d8f08bc2 --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/strings.xml @@ -0,0 +1,10 @@ + + + + AndroidSample + Settings + Hello world! + JavaActivity + KotlinActivity + + diff --git a/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/styles.xml b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..6ce89c7b --- /dev/null +++ b/integration-tests/gradle-integration-tests/testData/androidApp/app/src/main/res/values/styles.xml @@ -0,0 +1,20 @@ + + + + + + + + + -- cgit