-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Android library #2092
Android library #2092
Conversation
09cdd92
to
13287b2
Compare
@@ -274,7 +274,7 @@ def compile_dir(dfn, optimize_python=True): | |||
def make_package(args): | |||
# If no launcher is specified, require a main.py/main.pyo: | |||
if (get_bootstrap_name() != "sdl" or args.launcher is None) and \ | |||
get_bootstrap_name() != "webview": | |||
get_bootstrap_name() not in ["webview", "service_library"]: |
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 look like it should be a setting on the bootstrap.
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.
I originally limited the symlinking to the java source because that was the only thing I found useful to link that way, and I wasn't sure if all the android tools would be happy to work on symlinks. If you can vouch that symlinking more stuff works okay, then I don't see an issue.
This looks good to me, just a few minor comments in the review. |
8d51362
to
42e05d1
Compare
* ported @xuhcc's PR 1063 to recent p4a master * bootstraps dirs are cumulatively copied based on their inheritance, can be arbitrarily deep * add symlink param to copy_files, when set the copy target are symlinked * support for the aar directive in buildozer * create a 'p4a aar' command, so that lots of cluttering conditionals can be moved away from toolchain.apk() * began to remove ant support (@inclement allowed me to do so) * renamed library bootstrap to service_library, because that describe it better * test setup setup_testlib_service.py * renamed symlink_java_src to symlink_bootstrap_files * None is not allowed as bootstrap parameter * switched tests to use the sdl2 bootstrap
Thanks for all the rebase effort! |
Also removes unused `mActivity` member. Note we changed the constructor input parameter to accept a `Context` object which is a parent class of the previous `Activity` one. Changes were tested on both kivy and service_only bootstraps. Also removes the `get_common_dir()` as it's no longer used since kivy#2092
p4a support for service-backend by packaging an .aar library
This PR is built on #1963 submitted by @xuhcc who did great work in this direction, but unfortunately seems to have not the time to continue the work, so most credit goes to @xuhcc.
In the first turn I took his work and made it work from the current p4a develop (including a buildozer integration, see corresponding PR kivy/buildozer#1037)
I am willing to bring this to a form so that it can be merged and am open for discussions and happy for some good advice...
Most promising was inclement's proposal in which he proposed to pimp up the
service_only
bootstrap and move the build steps into anaar
command.If no other advice is coming I would go that way, since the service_only bootstrap seems to fit best here, but I don't want to break anything.
I have set up a test project where this can be tested.
UPDATE:
I added support for inheritance in bootstraps, so that a bootstrap inheriting from another bootstrap only needs to ad the files that differ from the original into it's bootstrap dir.
So we avoid file duplication.
what has been done so far:
symlink
param to copy_files, when set the copy target are symlinkedaar
directive in buildozertoolchain.apk()
library
bootstrap toservice_library
, because that describe it bettersetup_testlib_service.py
@inclement's change requests are implemented now
PR is ready to merge now