-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Flag optional Toga gradle dependencies. #1845
Conversation
Works for me; although, I had to be careful of the version of Toga I was using. Should we consider bumping the Toga requirement in the bootstraps? |
Strictly, that would only be needed for the Android backend; but regardless, I think it's more a case that we need to push out a new Toga release before this is merged. This change won't work until there's a public release that contains beeware/toga#2454; at which point, |
For consistency this should also be done for the However, wouldn't it be better to include all of Toga's dependencies by default? Before assuming any of them are too large, we should actually measure their effect on the size of the app. |
I don't think that's entirely true - we're using Material as a proxy for installing It looks like we could also be using it as a proxy for
I've just built a HelloWorld Android app with 3 different gradle configurations; the AAB sizes for those apps are:
So - there's about a 500kb difference in size including packages that aren't strictly needed. Explicitly including a dependency that is implied has a 100b cost, but that could easily be a quirk of compression. 500kb isn't much, but it also isn't nothing, so my inclination is to keep them optional (and lean into the fact that Material implies AppCompat). |
I've also pushed the lower version pin for Toga; this will need to wait until 0.4.5 has landed before CI will pass. |
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.
500kb isn't much, but it also isn't nothing, so my inclination is to keep them optional
OK, I guess we'll find out soon enough if people have trouble with it.
src/briefcase/bootstraps/toga.py
Outdated
@@ -51,15 +51,15 @@ def pyproject_table_macOS(self): | |||
return """\ | |||
universal_build = true | |||
requires = [ | |||
"toga-cocoa~=0.4.0", | |||
"toga-cocoa~=0.4.0, >=0.4.5", |
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.
This can be simplified to ~=0.4.5
.
5ac27db
to
a3c284a
Compare
Toga 0.4.5 has been released; I've merged with main, and the tests now pass. |
With the resolution of beeware/toga#2454, we're now in a position to soften the default Gradle dependencies for a Toga Android project. We can also include the known optional requirement for MapView .
PR Checklist: