-
Notifications
You must be signed in to change notification settings - Fork 27.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure apps can build while using AGP 3.3.0 #71964
Ensure apps can build while using AGP 3.3.0 #71964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just style nits, overall should be fine
@@ -10,12 +10,12 @@ import 'package:flutter_devicelab/framework/utils.dart'; | |||
import 'package:path/path.dart' as path; | |||
|
|||
final String gradlew = Platform.isWindows ? 'gradlew.bat' : 'gradlew'; | |||
final String gradlewExecutable = Platform.isWindows ? '.\\$gradlew' : './$gradlew'; | |||
final String gradlewExecutable = | |||
Platform.isWindows ? '.\\$gradlew' : './$gradlew'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: undo linebreak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and elsewhere - it looks like dartfmt may have been applied where it shouldn't be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
options: <String>[ | ||
'--template=plugin', | ||
'--platforms=android', | ||
'plugin_test' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to break it this way add a trailing comma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pluginProject.dependencies.add( | ||
"${buildType.name}CompileOnly", | ||
"io.flutter:flutter_embedding_$flutterBuildMode:$engineVersion") | ||
addApiDependencies( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: does the Closure name addEmbeddingCompileOnlyDependency
still makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I renamed it, but after looking at some test cases, it would need to use api
or compileOnly
depending on the Gradle version.
Description
The embedding must be an API dependency in AGP 3.3.0. The most recent version allows this to be a compileOnly dependency, which is accurate as the embedding jar is provided by the app.
Tests
I added the following tests: integration test
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.