-
Notifications
You must be signed in to change notification settings - Fork 538
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
Fixes part of #59: Model module builds with both Bazel + Gradle #1481
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.
Thanks @miaboloix! Do we need the top-level BUILD.bazel file?
Also: branch names should follow the format:
E.g. |
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
just a nit update, update the PR description from model_lib
to model
as we had updated the android_library name = "model",
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.
Just one comment.
@miaboloix I count 5 open threads that require a response and potentially some follow-up. Please re-assign once done. Also regarding your earlier question, let's keep the branch name as-is & use the established convention for future branches. |
Done! |
Technically not until we start working on the binary. Just deleted it! |
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.
Thanks @miaboloix! This LGTM!
…+ Gradle [BLOCKED: #1481] (#1482) * Working on having one module build with bazel * Created initial app-level WORKSPACE file * Added proto_library rule to build model app module * Added newline at end of WORKSPACE file * Created macro to process proto files * Both Bazel and Gradle now build /model successfully * Fixed typo in BUILD * Added missing end of file empty lines * Added Robolectric dependencies and general build rule * Source files building in both systems - added a TODO for test files * Turned two kt_android_library rules into one * Added dependencies for test files * Added a test manifest for android_local_test() * Added Firebase dependencies and git_repository for tools_android * Refactored google-services.json, imported new dependencies * Fixed Bens nits * Fixed space in WORKSPACE comment * Got a demo test working in both Java and Kotlin * Added rules_java dependencies for protocol buffers * Added java_proto_library rules, each proto file now has its own rule * Remove unnecessary srcs attribute for android_library * Rename bzl file macro * Changed to java_lite * Each library now has its own build rule * Utility is now one rule * Changed visibility for utility_lib * Added duplicate google-services.json file to please Gradle * Changed event_logger.proto to oppia_logger.proto * Added missing EOF newlines * Fixed bug in import statements for exploration.proto, topic.proto, and question.proto * Deleted DemoJava * CHanged rules_kotlin version * Added Firebase dependencies * Removed AsyncResultTest example * Removed unnecessary comments in WORKSPACE and moved rules_kotlin * Added re-naming TODOs * Renamed java_proto rules java_proto_lite * Added doc comments to model/BUILD.bazel and format_import_proto_library * Added comments to WORKSPACE file * Fixed nits * Added comment to kt_android_library() rule * Fixed more nits * Added Firebase comment * Changed library name to model * Formatted WORKSPACE comment * Formatted TODO statement * Changed format_import_proto_library comment * Added EOF newline * Created Issue and linked TODO in WORKSPACE * Edited model BUILD file top comment * Addressed nits * Fixed nits and added comments * Fixing nits * Deleted unnecessary dependencies and testing example file * Fixed manifest issues * Move google json file * Restore app version of json * Edit TODO * Deleted TODO * Changed Firebase comment * Added targetSDK to manifests * Changed crashlytics_lib to crashlytics * Fixed nits and added TODOs * Changed targetSDK to 29 * Formatted TODO * Moved google-services.json * Added gogle-services.json back to app * Formatted dependencies and removed unused dependency * Updated dependency list * Fixed the duplicate google-services.json issue * Created Issue and added TODO * Changed targetSdk to 28
Explanation
Fixes part of #59: Model module builds with both Bazel + Gradle
As part of the first step towards migrating to Bazel, I have added a root WORKSPACE file that imports the external dependencies necessary to begin building with Bazel. I have also added both a root BUILD file and a
/model
module BUILD file.To build the
/model
module in Bazel:bazel build //model
Note:
bazel clean
BUILD
but because we are working alongside Gradle, following this convention causes naming conflicts with existing Gradle files. So, to solve this, all BUILD files will be namedBUILD.bazel
until we are completely moved off of Gradle. See Change Bazel BUILD file names post-Gradle #1532.Checklist