forked from firka/flutter
Remove v1 Android create templates (#61203)
This commit is contained in:
@@ -13,8 +13,6 @@ import 'package:path/path.dart' as path;
|
||||
final String gradlew = Platform.isWindows ? 'gradlew.bat' : 'gradlew';
|
||||
final String gradlewExecutable = Platform.isWindows ? '.\\$gradlew' : './$gradlew';
|
||||
|
||||
final bool useAndroidEmbeddingV2 = Platform.environment['ENABLE_ANDROID_EMBEDDING_V2'] == 'true';
|
||||
|
||||
/// Tests that the Android app containing a Flutter module can be built when
|
||||
/// it has custom build types and flavors.
|
||||
Future<void> main() async {
|
||||
@@ -60,7 +58,7 @@ Future<void> main() async {
|
||||
flutterDirectory.path,
|
||||
'dev',
|
||||
'integration_tests',
|
||||
useAndroidEmbeddingV2 ? 'module_host_with_custom_build_v2_embedding' : 'module_host_with_custom_build',
|
||||
'module_host_with_custom_build_v2_embedding',
|
||||
),
|
||||
),
|
||||
hostAppDir,
|
||||
|
||||
@@ -14,8 +14,6 @@ final String gradlew = Platform.isWindows ? 'gradlew.bat' : 'gradlew';
|
||||
final String gradlewExecutable = Platform.isWindows ? '.\\$gradlew' : './$gradlew';
|
||||
final String fileReadWriteMode = Platform.isWindows ? 'rw-rw-rw-' : 'rw-r--r--';
|
||||
|
||||
final bool useAndroidEmbeddingV2 = Platform.environment['ENABLE_ANDROID_EMBEDDING_V2'] == 'true';
|
||||
|
||||
/// Tests that the Flutter module project template works and supports
|
||||
/// adding Flutter to an existing Android app.
|
||||
Future<void> main() async {
|
||||
@@ -177,7 +175,7 @@ Future<void> main() async {
|
||||
flutterDirectory.path,
|
||||
'dev',
|
||||
'integration_tests',
|
||||
useAndroidEmbeddingV2 ? 'android_host_app_v2_embedding' : 'android_host_app',
|
||||
'android_host_app_v2_embedding',
|
||||
),
|
||||
),
|
||||
hostApp,
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# 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.
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility 1.8
|
||||
targetCompatibility 1.8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId "io.flutter.add2app"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':flutter')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file. -->
|
||||
|
||||
<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>
|
||||
@@ -1,18 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package io.flutter.add2app;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
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"));
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
@@ -1,6 +0,0 @@
|
||||
#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-5.6.2-all.zip
|
||||
@@ -1,7 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
include ':app'
|
||||
setBinding(new Binding([gradle: this]))
|
||||
evaluate(new File(settingsDir.parentFile, 'hello/.android/include_flutter.groovy'))
|
||||
@@ -1,8 +0,0 @@
|
||||
# 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_host_with_custom_build_test.dart` device lab test.
|
||||
@@ -1,46 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileOptions {
|
||||
sourceCompatibility 1.8
|
||||
targetCompatibility 1.8
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId "io.flutter.addtoapp"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
// Test build types.
|
||||
buildTypes {
|
||||
staging {
|
||||
initWith debug
|
||||
// This is required because the `:flutter` project doesn't define this custom build type.
|
||||
// Without the fallback, the Android plugin will make Gradle exit with the following error:
|
||||
// `Unable to find a matching variant of project :flutter`
|
||||
matchingFallbacks = ['debug']
|
||||
}
|
||||
prod {
|
||||
initWith release
|
||||
matchingFallbacks = ['release']
|
||||
}
|
||||
}
|
||||
// Test flavors.
|
||||
flavorDimensions "version"
|
||||
productFlavors {
|
||||
demo {
|
||||
dimension "version"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':flutter')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file. -->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="io.flutter.addtoapp">
|
||||
|
||||
<application android:allowBackup="false"
|
||||
tools:ignore="GoogleAppIndexingWarning,MissingApplicationIcon">
|
||||
<activity android:name=".MainActivity" />
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -1,18 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package io.flutter.addtoapp;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
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"));
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
@@ -1,6 +0,0 @@
|
||||
#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-5.6.2-all.zip
|
||||
@@ -1,7 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
include ':app'
|
||||
setBinding(new Binding([gradle: this]))
|
||||
evaluate(new File(settingsDir.parentFile, 'hello/.android/include_flutter.groovy'))
|
||||
Reference in New Issue
Block a user