{"id":20997009,"url":"https://github.com/menny/bazel-leaf","last_synced_at":"2025-09-01T22:39:59.616Z","repository":{"id":53536620,"uuid":"119873830","full_name":"menny/bazel-leaf","owner":"menny","description":"A Gradle plugin that builds modules using Bazel.","archived":false,"fork":false,"pushed_at":"2018-07-17T14:55:00.000Z","size":4153,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-09T16:07:53.493Z","etag":null,"topics":["android","bazel","gradle","gradle-plugin","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/menny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-01T18:08:25.000Z","updated_at":"2023-02-03T12:12:51.000Z","dependencies_parsed_at":"2022-09-15T14:50:41.933Z","dependency_job_id":null,"html_url":"https://github.com/menny/bazel-leaf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/menny/bazel-leaf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menny%2Fbazel-leaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menny%2Fbazel-leaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menny%2Fbazel-leaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menny%2Fbazel-leaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/menny","download_url":"https://codeload.github.com/menny/bazel-leaf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menny%2Fbazel-leaf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273203230,"owners_count":25063275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bazel","gradle","gradle-plugin","java"],"created_at":"2024-11-19T07:38:23.352Z","updated_at":"2025-09-01T22:39:59.578Z","avatar_url":"https://github.com/menny.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍂🐘 Bazel Leaf\n\nA Gradle plugin that builds modules using Bazel.\n\n# Setup\n\n## Development Setup\n* This was only tested with _Android Studio 3.1-alpha9_, on macOS.\n* ensure you have Bazel installed. Follow the instructions [here](https://docs.bazel.build/versions/master/install.html)\n* (optionally) if `bazel` binary in not in PATH set the path to it in `local.properties`:\n  * `bazel.bin.path=/usr/local/bin/bazel`\n* Open this project using Android Studio.\n* Read the [Known Issues](#known-issues) section.\n\n# Repo Structure:\n\n```\napp - an Android app which is built using Gradle\n  |\n  |_ lib1 - a Java lib that is built using Gradle\n  |    |\n  |    |_ Lib2 - a Java lib that is build using Bazel\n  |\n  |_ lib3 - a Java lib that is built using Bazel\n  |    |\n  |    |_ lib4 - a Java lib that is built using Bazel\n  |\n  |_ andlib - an Android lib that is built using Bazel\n  |    |\n  |    |_ innerandlib - an Android lib that is built using Bazel\n  |\n  |_ gandlib - an Android lib that is built using Gradle\n       |\n       |_ innerandlib - an Android lib that is built using Bazel\n       |\n       |_ lib4 - a Java lib that is built using Bazel\n\n\n```\n\n## Module Setup\nFor each module that is built using Bazel:\n* create a `build.gradle` file for the module\n* apply the `bazel-leaf` plugin:\n```\napply plugin: 'bazelleaf'\n```\n* add build configuration, and specify which target should be built with Bazel:\n```\nbazel {\n    target = 'jar'\n}\n```\n* you may add a test-target, which will be used when `./gradlew test` is called:\n```\nbazel {\n    target = 'jar'\n    testTarget = 'AllTests'\n}\n```\n# Road Map\n* Support for running tests using Robolectric.\n* Support for remote (Maven?) dependencies.\n\n# Known Issues\n* In most cases, you'll need to first build the project from command line before importing it into Android Studio. For this project, run\n`./gradlew :app:assembleDebug` before importing into Android Studio, or before doing gradle-sync for the first time.\n* When using a Maven dependency in Bazel, Android-Studio will not detect that.\n\n# License\n```\nCopyright 2018 Spotify\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmenny%2Fbazel-leaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmenny%2Fbazel-leaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmenny%2Fbazel-leaf/lists"}