Read custom app project name from gradle.properties (#52791)

This commit is contained in:
Anisov Aleksey
2020-04-06 10:46:44 +07:00
committed by GitHub
parent f118e99f0c
commit be6234d56e
12 changed files with 470 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
# Android custom 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_custom_host_app_name_test.dart` device lab test.

View File

@@ -0,0 +1,27 @@
// 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'
}

View File

@@ -0,0 +1,13 @@
<!-- 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>

View File

@@ -0,0 +1,12 @@
// 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.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}

View File

@@ -0,0 +1,24 @@
// 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
}

View File

@@ -0,0 +1,4 @@
org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
android.enableJetifier=true
flutter.hostAppProjectName=SampleApp

View 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-5.6.2-all.zip

View File

@@ -0,0 +1,8 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Thu Mar 26 18:32:27 GMT+07:00 2020
sdk.dir=/Users/alekseyanisov/Library/Android/sdk

View File

@@ -0,0 +1,7 @@
// 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 ':SampleApp'
setBinding(new Binding([gradle: this]))
evaluate(new File(settingsDir.parentFile, 'hello/.android/include_flutter.groovy'))