Add2app devicelab test (#18795)
This commit is contained in:
committed by
GitHub
parent
75b737ff69
commit
d4db748047
8
dev/integration_tests/android_host_app/README.md
Normal file
8
dev/integration_tests/android_host_app/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Android host app
|
||||
|
||||
Android host app for a Flutter module created using
|
||||
```
|
||||
$ flutter create -t module hello
|
||||
```
|
||||
and placed in a sibling folder to (a clone of) the host app.
|
||||
Used by the `module_test.dart` device lab test.
|
||||
18
dev/integration_tests/android_host_app/app/build.gradle
Normal file
18
dev/integration_tests/android_host_app/app/build.gradle
Normal file
@@ -0,0 +1,18 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
defaultConfig {
|
||||
applicationId "io.flutter.add2app"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':flutter')
|
||||
implementation 'com.android.support:appcompat-v7:27.1.1'
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="io.flutter.add2app">
|
||||
|
||||
<application android:allowBackup="false"
|
||||
tools:ignore="GoogleAppIndexingWarning,MissingApplicationIcon">
|
||||
<activity android:name=".MainActivity" />
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,14 @@
|
||||
package io.flutter.add2app;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import io.flutter.facade.Flutter;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(Flutter.createView(this, getLifecycle(), "route1"));
|
||||
}
|
||||
}
|
||||
20
dev/integration_tests/android_host_app/build.gradle
Normal file
20
dev/integration_tests/android_host_app/build.gradle
Normal file
@@ -0,0 +1,20 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.3'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
1
dev/integration_tests/android_host_app/gradle.properties
Normal file
1
dev/integration_tests/android_host_app/gradle.properties
Normal file
@@ -0,0 +1 @@
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
6
dev/integration_tests/android_host_app/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
dev/integration_tests/android_host_app/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#Mon Jun 25 14:13:36 CEST 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
3
dev/integration_tests/android_host_app/settings.gradle
Normal file
3
dev/integration_tests/android_host_app/settings.gradle
Normal file
@@ -0,0 +1,3 @@
|
||||
include ':app'
|
||||
setBinding(new Binding([gradle: this]))
|
||||
evaluate(new File(settingsDir.parentFile, 'hello/.android/include_flutter.groovy'))
|
||||
Reference in New Issue
Block a user