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
2b8c75d5
Unverified
Commit
2b8c75d5
authored
Jan 22, 2020
by
Emmanuel Garcia
Committed by
GitHub
Jan 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy the local engine repo in the output directory (#49276)
parent
10fb0182
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
aar_init_script.gradle
packages/flutter_tools/gradle/aar_init_script.gradle
+1
-1
gradle.dart
packages/flutter_tools/lib/src/android/gradle.dart
+13
-0
gradle_test.dart
...flutter_tools/test/general.shard/android/gradle_test.dart
+21
-0
No files found.
packages/flutter_tools/gradle/aar_init_script.gradle
View file @
2b8c75d5
...
...
@@ -33,7 +33,7 @@ void configureProject(Project project, String outputDir) {
project
.
android
.
libraryVariants
.
all
{
variant
->
addAarTask
(
project
,
variant
)
}
project
.
uploadArchives
{
repositories
{
mavenDeployer
{
...
...
packages/flutter_tools/lib/src/android/gradle.dart
View file @
2b8c75d5
...
...
@@ -546,6 +546,19 @@ Future<void> buildGradleAar({
command
.
add
(
'-Plocal-engine-repo=
${localEngineRepo.path}
'
);
command
.
add
(
'-Plocal-engine-build-mode=
${androidBuildInfo.buildInfo.modeName}
'
);
command
.
add
(
'-Plocal-engine-out=
${localEngineArtifacts.engineOutPath}
'
);
// Copy the local engine repo in the output directory.
try
{
fsUtils
.
copyDirectorySync
(
localEngineRepo
,
getRepoDirectory
(
outputDirectory
),
);
}
on
FileSystemException
catch
(
_
)
{
throwToolExit
(
'Failed to copy the local engine
${localEngineRepo.path}
repo '
'in
${outputDirectory.path}
'
);
}
}
command
.
add
(
aarTask
);
...
...
packages/flutter_tools/test/general.shard/android/gradle_test.dart
View file @
2b8c75d5
...
...
@@ -1055,10 +1055,12 @@ plugin1=${plugin1.path}
MockProcessManager
mockProcessManager
;
FakePlatform
android
;
FileSystem
fileSystem
;
FileSystemUtils
fileSystemUtils
;
Cache
cache
;
setUp
(()
{
fileSystem
=
MemoryFileSystem
();
fileSystemUtils
=
MockFileSystemUtils
();
mockAndroidSdk
=
MockAndroidSdk
();
mockAndroidStudio
=
MockAndroidStudio
();
mockArtifacts
=
MockLocalEngineArtifacts
();
...
...
@@ -1773,6 +1775,12 @@ plugin1=${plugin1.path}
'''
);
fileSystem
.
directory
(
'.android/gradle'
)
.
createSync
(
recursive:
true
);
fileSystem
.
directory
(
'.android/gradle/wrapper'
)
.
createSync
(
recursive:
true
);
fileSystem
.
file
(
'.android/gradlew'
).
createSync
(
recursive:
true
);
fileSystem
.
file
(
'.android/gradle.properties'
)
...
...
@@ -1790,6 +1798,8 @@ plugin1=${plugin1.path}
fileSystem
.
directory
(
'build/outputs/repo'
).
createSync
(
recursive:
true
);
when
(
fileSystemUtils
.
copyDirectorySync
(
any
,
any
)).
thenReturn
(
null
);
await
buildGradleAar
(
androidBuildInfo:
const
AndroidBuildInfo
(
BuildInfo
(
BuildMode
.
release
,
null
)),
project:
FlutterProject
.
current
(),
...
...
@@ -1812,6 +1822,15 @@ plugin1=${plugin1.path}
expect
(
actualGradlewCall
,
contains
(
'-Plocal-engine-build-mode=release'
));
expect
(
actualGradlewCall
,
contains
(
'-PbuildNumber=2.0'
));
// Verify the local engine repo is copied into the generated Maven repo.
final
List
<
dynamic
>
copyDirectoryArguments
=
verify
(
fileSystemUtils
.
copyDirectorySync
(
captureAny
,
captureAny
)
).
captured
;
expect
(
copyDirectoryArguments
.
length
,
2
);
expect
((
copyDirectoryArguments
.
first
as
Directory
).
path
,
'/.tmp_rand0/flutter_tool_local_engine_repo.rand0'
);
expect
((
copyDirectoryArguments
.
last
as
Directory
).
path
,
'build/outputs/repo'
);
},
overrides:
<
Type
,
Generator
>{
AndroidSdk:
()
=>
mockAndroidSdk
,
AndroidStudio:
()
=>
mockAndroidStudio
,
...
...
@@ -1819,6 +1838,7 @@ plugin1=${plugin1.path}
Cache:
()
=>
cache
,
Platform:
()
=>
android
,
FileSystem:
()
=>
fileSystem
,
FileSystemUtils:
()
=>
fileSystemUtils
,
ProcessManager:
()
=>
mockProcessManager
,
});
});
...
...
@@ -2047,6 +2067,7 @@ class MockAndroidProject extends Mock implements AndroidProject {}
class
MockAndroidStudio
extends
Mock
implements
AndroidStudio
{}
class
MockDirectory
extends
Mock
implements
Directory
{}
class
MockFile
extends
Mock
implements
File
{}
class
MockFileSystemUtils
extends
Mock
implements
FileSystemUtils
{}
class
MockFlutterProject
extends
Mock
implements
FlutterProject
{}
class
MockLocalEngineArtifacts
extends
Mock
implements
LocalEngineArtifacts
{}
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
...
...
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