{"id":20294176,"url":"https://github.com/grab/grazel","last_synced_at":"2025-05-16T12:08:49.518Z","repository":{"id":38302430,"uuid":"379151190","full_name":"grab/grazel","owner":"grab","description":"A tool to migrate Android projects from Gradle to Bazel incrementally and automatically","archived":false,"fork":false,"pushed_at":"2025-03-10T03:42:44.000Z","size":5549,"stargazers_count":289,"open_issues_count":11,"forks_count":20,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-27T07:08:13.412Z","etag":null,"topics":["android","android-bazel","bazel","bazel-migration","gradle","gradle-plugin","gradle-to-bazel","kotlin"],"latest_commit_sha":null,"homepage":"https://grab.github.io/grazel/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-22T05:24:02.000Z","updated_at":"2025-03-18T14:49:53.000Z","dependencies_parsed_at":"2023-02-19T06:15:36.228Z","dependency_job_id":"f9efeb2b-ef68-4db6-87fb-fb1884348160","html_url":"https://github.com/grab/grazel","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grab%2Fgrazel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grab%2Fgrazel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grab%2Fgrazel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grab%2Fgrazel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grab","download_url":"https://codeload.github.com/grab/grazel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246961951,"owners_count":20861181,"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","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","android-bazel","bazel","bazel-migration","gradle","gradle-plugin","gradle-to-bazel","kotlin"],"created_at":"2024-11-14T15:28:07.977Z","updated_at":"2025-04-03T08:09:45.137Z","avatar_url":"https://github.com/grab.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grazel\n\n**Grazel** stands for `Gradle` to `Bazel`. A Gradle plugin to migrate Android projects\nto [Bazel build](https://bazel.build) system in an incremental and automated fashion.\n\n\u003cp align=\"center\"\u003e \n\u003c!-- \u003ca href=\"https://github.com/grab/grazel/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/grab/Grazel.svg?style=flat-square\u0026label=Release\u0026logo=github\u0026colorB=00bdd6\"/\u003e\u003c/a\u003e --\u003e\n\u003cimg alt=\"Maven Central\" src=\"https://img.shields.io/maven-central/v/com.grab.grazel/grazel-gradle-plugin?logo=apache-maven\u0026logoColor=%23C71A36\u0026style=flat-square\u0026colorB=00bdd6\"\u003e\n\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/grab/Grazel/ci.yml?logo=github\u0026style=flat-square\"\u003e\n\u003ca href=\"https://grab.github.io/grazel/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Website-%20-lightgrey.svg?color=00bdd6\u0026colorA=00bdd6\u0026style=flat-square\u0026logo=github\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/images/grazel-demo.gif\" width=\"85%\"\u003e\n\u003c/p\u003e\n\n## Components\n\n* [Gradle plugin](https://github.com/grab/grazel/tree/master/grazel-gradle-plugin)\n* A Kotlin Starlark DSL to generate Starlark code in a type-safe way.\n* [Grab Bazel Common](https://github.com/grab/grab-bazel-common) - Custom rules to bridge the gap\n  between Gradle/Bazel.\n\n## Features\n\n* Generate `BUILD.bazel`, `WORKSPACE` for given Android project and reduce the overall migration\n  effort.\n* Setup [hybrid build](https://grab.github.io/grazel/hybrid_builds/) to build part of project graph\n  to build with Bazel and rest with Gradle.\n* Minimal source changes to codebase - supported\n  by [Grab Bazel Common](https://github.com/grab/grab-bazel-common).\n* Gradle Configuration as source of truth.\n\nFor documentation and usage instructions, please visit [website](https://grab.github.io/grazel/).\n\n## How it works\n\nIt works by automatically generating Bazel scripts for given Android project based on your Gradle\nconfiguration. For simple projects, it should be able to migrate, fully build and launch the app\nwith `bazel mobile-install //\u003ctarget-name\u003e`.\n\nFor example, for the following Gradle configuration:\n\n```groovy\napply plugin: \"com.android.library\"\napply plugin: \"kotlin-android\"\n\nandroid {\n    compileSdkVersion rootProject.compileSdk\n    defaultConfig {\n        minSdkVersion rootProject.minSdk\n        targetSdkVersion rootProject.targetSdk\n        versionCode 1\n        versionName \"1.0\"\n    }\n}\n\ndependencies {\n    implementation project(\":app\")\n    implementation project(\":base\")\n    implementation \"androidx.test.espresso:espresso-idling-resource:3.2.0\"\n}\n```\n\nGrazel's `migrateToBazel` task generates the following build script:\n\n```python\nload(\"@io_bazel_rules_kotlin//kotlin:kotlin.bzl\", \"kt_android_library\")\n\nkt_android_library(\n    name = \"quiz\",\n    srcs = glob([\n        \"src/main/java/**/*.kt\",\n    ]),\n    custom_package = \"com.google.samples.apps.topeka.quiz\",\n    manifest = \"src/main/AndroidManifest.xml\",\n    resource_files = glob([\n        \"src/main/res/**\",\n    ]),\n    visibility = [\n        \"//visibility:public\",\n    ],\n    deps = [\n        \"//app\",\n        \"//base\",\n        \"@maven//:androidx_test_espresso_espresso_idling_resource\",\n    ],\n)\n```\n\nSee [migration capabilities](https://grab.github.io/grazel/migration_capabilities) for supported\nfeatures. In advanced cases, where entire project might not\nbe [migratable](https://grab.github.io/grazel/migration_criteria), it migrates part of the graph and\nsets up [hybrid build](https://grab.github.io/grazel/hybrid_builds) where part of the graph can be\nbuilt with Bazel and rest with Gradle.\n\n## Resources\n\n* [Grab's migration journey from Gradle to Bazel via automation](https://www.youtube.com/watch?v=VMkjZAI_sN8) - Build Meetup'21.\n\n## License\n\n```\nCopyright 2022 Grabtaxi Holdings PTE LTD (GRAB)\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\n    http://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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrab%2Fgrazel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrab%2Fgrazel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrab%2Fgrazel/lists"}