-
Notifications
You must be signed in to change notification settings - Fork 37
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 cli #103
Android cli #103
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.
I like the deduplication for configs! In general it makes sense. Still not 100% sure on all implications but directionally it makes sense to me.
I think some of these interface points relate to how we imagine config and cli options to work and interact. For example, can a user specify everything related to build settings in config file? Can this be overridden with CLI?
As one example: one could imagine user specifying build targets in config, and mopro build
picking up on this, as opposed to (easily) forgetting to specify which platforms to build for every time.
I suspect this is a larger conversation re API design, and better to get this merged since it introduces a new capability. But can share initial thoughts so we have a clearer direction for config/CLI options
mopro-cli/README.md
Outdated
### Exporting bindings | ||
|
||
To export bindings to a different directory: | ||
|
||
`mopro export-bindings --destination <DESTINATION_DIR>` | ||
`mopro export-bindings --destination <DESTINATION_DIR> --platforms <IOS_OR_ANDROID>` |
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 find --platforms
here a bit confusing, because it is plurals and in other commands it is meant for multiple platforms at once.
I guess --platform
would work?
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.
it works as previous platforms
it can be one platform or multiple platforms (--platforms ios android
)
but I improved it a little bit here: 8d57287
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.
Oh right, I was confused because the comment said IOS_OR_ANDROID
@@ -68,6 +68,8 @@ enum Commands { | |||
}, | |||
/// Exports platform bindings to some other directory | |||
ExportBindings { | |||
#[arg(long, num_args = 1.., default_value = "ios")] | |||
platforms: Vec<String>, |
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.
Should be adjust if we don't allow multiple platforms for export
Alternatively, we could maybe have
--destination-ios
--destination-android?
That way all bindings can be exported in one go. But maybe confusing, not sure.
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.
same here
we can export with multiple platforms?
--platforms ios android
# Build process | ||
#---------------------------------------------------------------------------- | ||
|
||
# Build process for mopro_core |
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 guess this works for now, but I wonder if we can simplify/deduplicate build scripts:
- build_core
- build_ios
- build_android
- (build ios and android)
Or can we keep it like this, not sure
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.
or we can have one entry build script
and separate android, ios...in other file:
- build.sh
- android.sh
- ios.sh
- ...
(maybe in the next PR)
scripts/cli/build_core.sh
Outdated
@@ -58,6 +59,29 @@ case $DEVICE_TYPE in | |||
;; | |||
esac | |||
|
|||
case $ANDROID_DEVICE_TYPE in |
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.
What does it mean semantically to build Android Device Type for Core (Desktop) only?
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.
right I just copied from build_android
but it does not make much sense here
I removed them 279b6d9
@@ -0,0 +1,13 @@ | |||
<?xml version="1.0" encoding="utf-8"?><!-- |
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.
Is all of this normally part of Android app or should it be in gitignore?
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.
@@ -0,0 +1,185 @@ | |||
#!/usr/bin/env sh |
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.
Is all of this normally part of Android app or should it be in gitignore?
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.
yes it can be removed
thank you for finding this
e865227
Also, that was quick! Nice work |
yes agree |
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.
Awesome! Thank you
mopro init --platforms android
mopro prepare
mopro build --platforms android
mopro export-bindings --platforms android --destination <DESTINATION>