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
e61ab4a8
Unverified
Commit
e61ab4a8
authored
Apr 01, 2020
by
Emmanuel Garcia
Committed by
GitHub
Apr 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy APK into a known location, so it can be easily discovered (#53718)
parent
b6423e45
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
17 deletions
+53
-17
gradle_jetifier_test.dart
dev/devicelab/bin/tasks/gradle_jetifier_test.dart
+2
-4
gradle_plugin_dependencies_test.dart
dev/devicelab/bin/tasks/gradle_plugin_dependencies_test.dart
+2
-4
gradle_plugins_without_annotations_test.dart
...ab/bin/tasks/gradle_plugins_without_annotations_test.dart
+2
-4
apk_utils.dart
dev/devicelab/lib/framework/apk_utils.dart
+4
-4
flutter.gradle
packages/flutter_tools/gradle/flutter.gradle
+43
-1
No files found.
dev/devicelab/bin/tasks/gradle_jetifier_test.dart
View file @
e61ab4a8
...
...
@@ -80,8 +80,7 @@ Future<void> main() async {
'build'
,
'app'
,
'outputs'
,
'apk'
,
'release'
,
'flutter-apk'
,
'app-release.apk'
,
));
...
...
@@ -118,8 +117,7 @@ Future<void> main() async {
'build'
,
'app'
,
'outputs'
,
'apk'
,
'debug'
,
'flutter-apk'
,
'app-debug.apk'
,
));
...
...
dev/devicelab/bin/tasks/gradle_plugin_dependencies_test.dart
View file @
e61ab4a8
...
...
@@ -77,8 +77,7 @@ Future<void> main() async {
'build'
,
'app'
,
'outputs'
,
'apk'
,
'release'
,
'flutter-apk'
,
'app-release.apk'
,
));
...
...
@@ -116,8 +115,7 @@ Future<void> main() async {
'build'
,
'app'
,
'outputs'
,
'apk'
,
'debug'
,
'flutter-apk'
,
'app-debug.apk'
,
));
...
...
dev/devicelab/bin/tasks/gradle_plugins_without_annotations_test.dart
View file @
e61ab4a8
...
...
@@ -84,8 +84,7 @@ Future<void> main() async {
'build'
,
'app'
,
'outputs'
,
'apk'
,
'release'
,
'flutter-apk'
,
'app-release.apk'
,
));
...
...
@@ -118,8 +117,7 @@ Future<void> main() async {
'build'
,
'app'
,
'outputs'
,
'apk'
,
'debug'
,
'flutter-apk'
,
'app-debug.apk'
,
));
...
...
dev/devicelab/lib/framework/apk_utils.dart
View file @
e61ab4a8
...
...
@@ -332,10 +332,10 @@ class FlutterPluginProject {
String
get
rootPath
=>
path
.
join
(
parent
.
path
,
name
);
String
get
examplePath
=>
path
.
join
(
rootPath
,
'example'
);
String
get
exampleAndroidPath
=>
path
.
join
(
examplePath
,
'android'
);
String
get
debugApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'
apk'
,
'debug
'
,
'app-debug.apk'
);
String
get
releaseApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'
apk'
,
'release
'
,
'app-release.apk'
);
String
get
releaseArmApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'
apk'
,
'release'
,
'app-armeabi-v7a-release.apk'
);
String
get
releaseArm64ApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'
apk'
,
'release
'
,
'app-arm64-v8a-release.apk'
);
String
get
debugApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'
flutter-apk
'
,
'app-debug.apk'
);
String
get
releaseApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'
flutter-apk
'
,
'app-release.apk'
);
String
get
releaseArmApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'
flutter-apk'
,
'app-armeabi-v7a-release.apk'
);
String
get
releaseArm64ApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'
flutter-apk
'
,
'app-arm64-v8a-release.apk'
);
String
get
releaseBundlePath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'bundle'
,
'release'
,
'app.aab'
);
Future
<
void
>
runGradleTask
(
String
task
,
{
List
<
String
>
options
})
async
{
...
...
packages/flutter_tools/gradle/flutter.gradle
View file @
e61ab4a8
...
...
@@ -757,7 +757,49 @@ class FlutterPlugin implements Plugin<Project> {
}
}
if
(
project
.
android
.
hasProperty
(
"applicationVariants"
))
{
project
.
android
.
applicationVariants
.
all
addFlutterDeps
project
.
android
.
applicationVariants
.
all
{
variant
->
addFlutterDeps
(
variant
)
// Copy the output APKs into a known location, so `flutter run` or `flutter build apk`
// can discover them. By default, this is `<app-dir>/build/app/outputs/flutter-apk/<filename>.apk`.
//
// The filename consists of `app<-abi>?<-flavor-name>?-<build-mode>.apk`.
// Where:
// * `abi` can be `armeabi-v7a|arm64-v8a|x86|x86_64` only if the flag `split-per-abi` is set.
// * `flavor-name` is the flavor used to build the app in lower case if the assemble task is called.
// * `build-mode` can be `release|debug|profile`.
variant
.
outputs
.
all
{
output
->
// `assemble` became `assembleProvider` in AGP 3.3.0.
def
assembleTask
=
variant
.
hasProperty
(
"assembleProvider"
)
?
variant
.
assembleProvider
.
get
()
:
variant
.
assemble
assembleTask
.
doLast
{
// `packageApplication` became `packageApplicationProvider` in AGP 3.3.0.
def
outputDirectory
=
variant
.
hasProperty
(
"packageApplicationProvider"
)
?
variant
.
packageApplicationProvider
.
get
().
outputDirectory
:
variant
.
packageApplication
.
outputDirectory
// `outputDirectory` is a `DirectoryProperty` in AGP 4.1.
String
outputDirectoryStr
=
outputDirectory
.
metaClass
.
respondsTo
(
outputDirectory
,
"get"
)
?
outputDirectory
.
get
()
:
outputDirectory
String
filename
=
"app"
String
abi
=
output
.
getFilter
(
OutputFile
.
ABI
)
if
(
abi
!=
null
&&
!
abi
.
isEmpty
())
{
filename
+=
"-${abi}"
}
if
(
variant
.
flavorName
!=
null
&&
!
variant
.
flavorName
.
isEmpty
())
{
filename
+=
"-${variant.flavorName.toLowerCase()}"
}
filename
+=
"-${buildModeFor(variant.buildType)}"
project
.
copy
{
from
new
File
(
"$outputDirectoryStr/${output.outputFileName}"
)
into
new
File
(
"${project.buildDir}/outputs/flutter-apk"
);
rename
{
return
"${filename}.apk"
}
}
}
}
}
}
else
{
project
.
android
.
libraryVariants
.
all
addFlutterDeps
}
...
...
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