Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

blasten
Copy link

@blasten blasten commented Mar 10, 2020

Fixes flutter/flutter#39283

Merge this PR after flutter/flutter#52340 has been merged.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a good handle on the compatibility issues this could introduce for consumers? It seems like it should be better now than a year ago but I've lost touch with some of this.

As a nit you can ignore if you want: it might be better to move the download logic to CIPD rather than relying on maven. Maven has been pretty stable for us with this though so ... it's probably fine either way. The advantage of CIPD would be that we could more easily express this in our DEPS file and gclient would know how to track it properly.

@blasten
Copy link
Author

blasten commented Mar 10, 2020

@dnfield This shouldn't introduce any issue since we deprecated non-androidx builds in the previous stable release. I regard to versions, we aren't setting any version constraints at this point since Flutter projects aren't using Gradle 6.0 yet.

As a nit you can ignore if you want: it might be better to move the download logic to CIPD rather than relying on maven. Maven has been pretty stable for us with this though so ... it's probably fine either way. The advantage of CIPD would be that we could more easily express this in our DEPS file and gclient would know how to track it properly.

Sounds like we should have a bug to track that. However, we still need to generate pom files out of files.json, so we would need to keep some of that logic in the engine repo.

@blasten blasten requested a review from dnfield March 10, 2020 22:04
@blasten
Copy link
Author

blasten commented Mar 10, 2020

fyi @xster

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xster
Copy link
Member

xster commented Mar 11, 2020

Should we still send out a "breaking change" announcement? I think it was still previously possible to create a host app in Support and use the engine in Support in 1.12 right? Now using jetifier would be necessary in the host app?

*
* <p>// Create a ShimPluginRegistry and wrap the FlutterEngine with the shim. ShimPluginRegistry
* shimPluginRegistry = new ShimPluginRegistry(flutterEngine, platformViewsController);
* <pre>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@xster
Copy link
Member

xster commented Mar 11, 2020

The actual implementation LGTM. Thanks for finding all the matches.

@blasten
Copy link
Author

blasten commented Mar 11, 2020

@xster I thought we did that already last quarter. Otherwise, we should send the announcement now that flutter/flutter#52340 is checked in.

@blasten blasten force-pushed the remove_androidx_flag branch from c11582d to 74cb082 Compare March 12, 2020 22:07
@xster
Copy link
Member

xster commented Mar 13, 2020

What about existing projects? If I had an add-to-app project created with 1.12 and both are on support and I flutter upgrade after this, I'd have to jetify my host app then right? (I think that's probably ok, but we should have some announcement/wiki)

@tal-mi
Copy link

tal-mi commented May 7, 2020

What about existing projects? If I had an add-to-app project created with 1.12 and both are on support and I flutter upgrade after this, I'd have to jetify my host app then right? (I think that's probably ok, but we should have some announcement/wiki)

Thats actually not really okay. Project using add-to-app which are currently unable to update to androidX will be broken. As of 1.17 today they actually are.
Is there a way to keep the embedding with support other than just replacing the pom files with ones generated with 1.12?

@xster
Copy link
Member

xster commented May 7, 2020

@tal-mi would jetifying your project be possible?
It's not quite possible to mix and match the versions of the Flutter framework vs the Flutter engine vs the engine dependencies. So the best alternative is to stay on 1.12.

@tal-mi
Copy link

tal-mi commented May 7, 2020

If I create a library that depends on support libraries and a flutter module then I would have to stay on 1.12. I may have clients which will not want to update their apps to AndroidX so the best way for a "flutter build arr" flow is to provide an (androidX true/false) that will link the embedded libs accordingly.

@xster
Copy link
Member

xster commented May 7, 2020

Thanks for the context. I would suggest 2 approaches:

1- Create 2 libraries. 1 on support with a 1.12 Flutter module and 1 on AndroidX with a 1.17 module.
2- Create an AndroidX + 1.17 Flutter module library only, but your usage instructions will have to ask users to use jetifier.

to provide an (androidX true/false) that will link the embedded libs accordingly.

It's not quite just toggling upstream dependencies. The Flutter engine itself consumes support/AndroidX so it would need different engines altogether. And one instance of the framework isn't tested to work with multiple variants of the engine.

@tal-mi
Copy link

tal-mi commented May 7, 2020

Thanks for the advice.
Ill look into the best solution.
We must aspire for AndroidX migration in any case.

lucky-chen added a commit to lucky-chen/engine that referenced this pull request May 21, 2020
kangwang1988 pushed a commit to XianyuTech/engine that referenced this pull request Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate the engine to AndroidX
5 participants