-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Make android.app.Fragment handling way more explicitly #304
Comments
I'm unsure why using both I agree that we should get rid of the Optional plugin - at this point, there are cleaner ways to achieve optional dependencies. I'm still under the impression that we can make the Class lookup work dynamically, without having to require our users to modify their For now, I'm fine with adding the Edit: Additionally, we could also transition into a Gradle plugin, which would be able to perform some logic depending on what's available on the classpath, then pass that as an argument to our annotation processor. Just an unreflected thought that came to my mind a second ago, but which I found to be worth pointing out. |
I have some questions. Since the plugin sit here before I contribute to this project, I'm not sure the issue here.
Personally, I don't like adding |
Thx guys. I (deliberately) mixed two problems so let's go into one by one. 1. latent problem
As @aurae described currently user can't mix 2. SupportV13MissingException with newer ver of GradleAs @shiraji described we might be able to solve the problem by just updating optional-base Gradle plugin and I was aware of it actually. Say, I'm aware of that |
Regarding 1: Were you able to confirm that you can't use both Fragment types at the same time? Again, I feel like this shouldn't be an issue. Our Regarding 2: In a way, we're going to get first-hand support for optional dependencies with Android Gradle Plugin 2.5 and Gradle 3.5 (have any of you tried its preview? It's glorious). We can't force everybody to use a super-early preview version of an unstable plugin just yet, but eventually this is going to replace the need for a third-party Optional plugin. It remains to be seen if #279 is actually that plugin's fault, though. I believe that it's more likely a behavioral change to the way classpaths are set up between older versions of the Android Gradle plugin, and newer ones. Do you guys know if there's an official source for diffs of the plugin available somewhere? I always dig right into the source, however it would be helpful to find the differences in-between versions, once we isolated which version introduced the change. |
@aurae Ah sorry I missed your saying and found out that I was completely wrong! |
Removing the "optionality" & bundling
I actually like the second approach, but that requires us not to change the way The usage section of our README would turn into something like this (artifacts abbreviated):
|
@aurae Cool! Just in case I checked methods count: Now:
About one half, we should go this way 😃 |
Getting rid of the monolithic |
Looks good. Could we bump version to 3.0.0 for this feature? Users obviously know we change something. |
@shiraji I was thinking the same thing and checked Semantic Versioning, it says |
Overview
Now we have the problem(#279) that is caused by
optional-base
plugin and new Gradle. And I also found out that there's an unresolvable case like below with current approach:v4.Fragment
and normalFragment
in the same app with v13 support library dependencyTo avoid that I'd like to propose the following interface change.
@RuntimePermission
, if its value is true the library generates a code withFragmentCompat
.I'd say that by changing the way of dealing with Fragment explicitly we'll be able to avoid unexpected bugs eternally and make code much more declarative.
What do you think? @aurae @shiraji
The text was updated successfully, but these errors were encountered: