-
Notifications
You must be signed in to change notification settings - Fork 84
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
bazel: ensure envoy-mobile is able to be built from an external repo #877
Conversation
4a0320b
to
c5f7ce1
Compare
Signed-off-by: Alan Chiu <achiu@lyft.com>
b23d753
to
622a173
Compare
👀 @keith -- most of this is pretty vanilla: find+replace or some small tweak to a target. The main/big change is the |
Can you explain why this is needed? I have not seen targets pertaining to a workspace need to reference the project with an |
stamp = True, | ||
tools = ["@envoy_mobile//bazel:zipper"], | ||
visibility = ["//visibility:public"], |
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 an aar not already output as a zip? if it is you could probably remove this
touch $@ | ||
""", | ||
outs = ["envoy_mobile.zip"], | ||
cmd = "$(location @envoy_mobile//bazel:zipper) fc $@ $(SRCS)", | ||
stamp = True, |
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.
Seems like you probably shouldn't need stamp here 🤔
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 that do actually?
echo "No jni directory found" | ||
fi |
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.
echo "No jni directory found" | |
fi | |
echo "No jni directory found" | |
exit 1 | |
fi |
might want to fail here
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 was to allow for the optionality of not having a native dependency (helped with testing this bazel rule)
cp $$original_directory/$$src_proguard_txt ./proguard.txt | ||
cp $$original_directory/$$src_manifest_xml AndroidManifest.xml | ||
zip -r tmp.aar * > /dev/null | ||
cp tmp.aar $$original_directory/$@ |
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.
at some point with these scripts you might be better off splitting them into separate files
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.
Would it be better to split each private method into a separate file now?
Signed-off-by: Alan Chiu <achiu@lyft.com>
Signed-off-by: Alan Chiu <achiu@lyft.com>
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.
lgtm, do you mind updating the title, as this PR does more than that?
@envoy_mobile
to loading bazel files which live in envoy mobileaar_with_jni
macro and include sources and javadoc generation as part of the macroSigned-off-by: Alan Chiu achiu@lyft.com
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Description: bazel: ensure envoy-mobile is able to be built from an external repo
Risk Level: low
Testing: ci + local
Docs Changes: n/a
Release Notes: n/a
[Optional Fixes #Issue]
[Optional Deprecated:]