Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
be6234d5
Unverified
Commit
be6234d5
authored
Apr 06, 2020
by
Anisov Aleksey
Committed by
GitHub
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read custom app project name from gradle.properties (#52791)
parent
f118e99f
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
470 additions
and
3 deletions
+470
-3
test.dart
dev/bots/test.dart
+1
-0
module_custom_host_app_name_test.dart
...devicelab/bin/tasks/module_custom_host_app_name_test.dart
+356
-0
README.md
dev/integration_tests/android_custom_host_app/README.md
+8
-0
build.gradle
...tion_tests/android_custom_host_app/SampleApp/build.gradle
+27
-0
AndroidManifest.xml
...id_custom_host_app/SampleApp/src/main/AndroidManifest.xml
+13
-0
MainActivity.java
...pleApp/src/main/java/io/flutter/add2app/MainActivity.java
+12
-0
build.gradle
dev/integration_tests/android_custom_host_app/build.gradle
+24
-0
gradle.properties
...tegration_tests/android_custom_host_app/gradle.properties
+4
-0
gradle-wrapper.properties
..._custom_host_app/gradle/wrapper/gradle-wrapper.properties
+6
-0
local.properties
...ntegration_tests/android_custom_host_app/local.properties
+8
-0
settings.gradle
...integration_tests/android_custom_host_app/settings.gradle
+7
-0
flutter.gradle
packages/flutter_tools/gradle/flutter.gradle
+4
-3
No files found.
dev/bots/test.dart
View file @
be6234d5
...
@@ -923,6 +923,7 @@ Future<void> _runHostOnlyDeviceLabTests() async {
...
@@ -923,6 +923,7 @@ Future<void> _runHostOnlyDeviceLabTests() async {
()
=>
_runDevicelabTest
(
'gradle_r8_test'
,
environment:
gradleEnvironment
),
()
=>
_runDevicelabTest
(
'gradle_r8_test'
,
environment:
gradleEnvironment
),
()
=>
_runDevicelabTest
(
'module_host_with_custom_build_test'
,
environment:
gradleEnvironment
,
testEmbeddingV2:
true
),
()
=>
_runDevicelabTest
(
'module_host_with_custom_build_test'
,
environment:
gradleEnvironment
,
testEmbeddingV2:
true
),
()
=>
_runDevicelabTest
(
'module_custom_host_app_name_test'
,
environment:
gradleEnvironment
),
()
=>
_runDevicelabTest
(
'module_test'
,
environment:
gradleEnvironment
,
testEmbeddingV2:
true
),
()
=>
_runDevicelabTest
(
'module_test'
,
environment:
gradleEnvironment
,
testEmbeddingV2:
true
),
()
=>
_runDevicelabTest
(
'plugin_dependencies_test'
,
environment:
gradleEnvironment
),
()
=>
_runDevicelabTest
(
'plugin_dependencies_test'
,
environment:
gradleEnvironment
),
...
...
dev/devicelab/bin/tasks/module_custom_host_app_name_test.dart
0 → 100644
View file @
be6234d5
This diff is collapsed.
Click to expand it.
dev/integration_tests/android_custom_host_app/README.md
0 → 100644
View file @
be6234d5
# 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.
dev/integration_tests/android_custom_host_app/SampleApp/build.gradle
0 → 100644
View file @
be6234d5
// 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'
}
dev/integration_tests/android_custom_host_app/SampleApp/src/main/AndroidManifest.xml
0 → 100644
View file @
be6234d5
<!-- 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>
dev/integration_tests/android_custom_host_app/SampleApp/src/main/java/io/flutter/add2app/MainActivity.java
0 → 100644
View file @
be6234d5
// 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
{
}
dev/integration_tests/android_custom_host_app/build.gradle
0 → 100644
View file @
be6234d5
// 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
}
dev/integration_tests/android_custom_host_app/gradle.properties
0 → 100644
View file @
be6234d5
org.gradle.jvmargs
=
-Xmx1536m
android.useAndroidX
=
true
android.enableJetifier
=
true
flutter.hostAppProjectName
=
SampleApp
dev/integration_tests/android_custom_host_app/gradle/wrapper/gradle-wrapper.properties
0 → 100644
View file @
be6234d5
#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
dev/integration_tests/android_custom_host_app/local.properties
0 → 100644
View file @
be6234d5
## 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
dev/integration_tests/android_custom_host_app/settings.gradle
0 → 100644
View file @
be6234d5
// 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'
))
packages/flutter_tools/gradle/flutter.gradle
View file @
be6234d5
...
@@ -721,8 +721,9 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -721,8 +721,9 @@ class FlutterPlugin implements Plugin<Project> {
return
return
}
}
// Flutter module included as a subproject in add to app.
// Flutter module included as a subproject in add to app.
Project
appProject
=
project
.
rootProject
.
findProject
(
':app'
)
String
hostAppProjectName
=
project
.
rootProject
.
hasProperty
(
'flutter.hostAppProjectName'
)
?
project
.
rootProject
.
property
(
'flutter.hostAppProjectName'
)
:
"app"
assert
appProject
!=
null
Project
appProject
=
project
.
rootProject
.
findProject
(
":${hostAppProjectName}"
)
assert
appProject
!=
null
:
"Project :${hostAppProjectName} doesn't exist. To custom the host app project name, set `org.gradle.project.flutter.hostAppProjectName=<project-name>` in gradle.properties."
appProject
.
afterEvaluate
{
appProject
.
afterEvaluate
{
assert
appProject
.
android
!=
null
assert
appProject
.
android
!=
null
appProject
.
android
.
applicationVariants
.
all
{
appProjectVariant
->
appProject
.
android
.
applicationVariants
.
all
{
appProjectVariant
->
...
@@ -750,7 +751,7 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -750,7 +751,7 @@ class FlutterPlugin implements Plugin<Project> {
}
}
Task
mergeAssets
=
project
Task
mergeAssets
=
project
.
tasks
.
tasks
.
findByPath
(
":
app
:merge${appProjectVariant.name.capitalize()}Assets"
)
.
findByPath
(
":
${hostAppProjectName}
:merge${appProjectVariant.name.capitalize()}Assets"
)
assert
mergeAssets
assert
mergeAssets
mergeAssets
.
dependsOn
(
copyFlutterAssetsTask
)
mergeAssets
.
dependsOn
(
copyFlutterAssetsTask
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment