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
947b48e0
Unverified
Commit
947b48e0
authored
Jun 18, 2020
by
Igor Akkerman
Committed by
GitHub
Jun 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flutter.gradle: collect list of Android plugins from .flutter-plugins-dependencies (#59294)
parent
e85655c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
flutter.gradle
packages/flutter_tools/gradle/flutter.gradle
+19
-9
No files found.
packages/flutter_tools/gradle/flutter.gradle
View file @
947b48e0
...
...
@@ -372,17 +372,27 @@ class FlutterPlugin implements Plugin<Project> {
}
private
Properties
getPluginList
()
{
File
pluginsFile
=
new
File
(
project
.
projectDir
.
parentFile
.
parentFile
,
'.flutter-plugins'
)
Properties
allPlugins
=
readPropertiesIfExist
(
pluginsFile
)
Properties
androidPlugins
=
new
Properties
()
allPlugins
.
each
{
name
,
path
->
if
(
doesSupportAndroidPlatform
(
path
))
{
androidPlugins
.
setProperty
(
name
,
path
)
def
flutterProjectRoot
=
project
.
projectDir
.
parentFile
.
parentFile
def
pluginsFile
=
new
File
(
flutterProjectRoot
,
'.flutter-plugins-dependencies'
)
if
(!
pluginsFile
.
exists
())
{
return
androidPlugins
}
// TODO(amirh): log an error if this plugin was specified to be an Android
// plugin according to the new schema, and was missing a build.gradle file.
// https://github.com/flutter/flutter/issues/40784
def
object
=
new
JsonSlurper
().
parseText
(
pluginsFile
.
text
)
assert
object
instanceof
Map
assert
object
.
plugins
instanceof
Map
assert
object
.
plugins
.
android
instanceof
List
// Includes the Flutter plugins that support the Android platform.
object
.
plugins
.
android
.
each
{
androidPlugin
->
assert
androidPlugin
.
name
instanceof
String
assert
androidPlugin
.
path
instanceof
String
def
pluginDirectory
=
new
File
(
androidPlugin
.
path
,
'android'
)
assert
pluginDirectory
.
exists
()
androidPlugins
.
setProperty
(
androidPlugin
.
name
,
androidPlugin
.
path
)
}
return
androidPlugins
}
...
...
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