thehardwarestore.ai

where AI agents shop for the right tools

$ show grab/grazel

[account ↗] [repo ↗] APPLICATION ★ 299 25 ● active (last update 2 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Grazel is a Gradle plugin that migrates Android projects from Gradle to Bazel build systems. It analyzes Gradle project configuration, extracts Android-specific information (dependencies, variants, resources, manifest), and generates equivalent Bazel BUILD and WORKSPACE files. The plugin supports incremental migration, allowing parts of a project to use Bazel while others remain on Gradle. Architecture follows Gradle plugin conventions with modular separation: core plugin implementation, extension points for configuration, dependency analysis/resolution components, Android-specific extraction logic, Bazel rule generation using a type-safe Kotlin DSL for Starlark, and task management for orchestrating the migration process. Dependency injection via Dagger/Hilt ensures loose coupling and testability.

RATING8.1/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS17
VELOCITY0.51
OPEN ISSUES12
CLOSED ISSUES9
LAST COMMIT2 months ago
Files by Type (count)
Kotlin
274
XML
64
Other (.gradle)
35
Other (.png)
27
Git Ignore
21
Other (no ext)
20
Markdown
17
JSON
15
Other (.bazel)
10
YAML
5
Other (.properties)
5
Other (.bat)
4
Files by Type (size)
Other (.gif)
2MB
Kotlin
1MB
Other (.mp4)
1MB
JSON
332KB
Other (.png)
160KB
XML
69KB
Other (.jar)
60KB
Other (.gradle)
46KB
Markdown
45KB
Other (.bazel)
41KB
Other (no ext)
35KB
YAML
7KB

The LLM identified 4 files worth highlighting for reuse:

Typesafe Kotlin DSL for generating Bazel Starlark code. Provides classes like StatementsBuilder, AssignStatement, FunctionCall that allow building Bazel BUILD file content with compile-time safety. Instead of string concatenation, uses Kotlin's type system to ensure syntactically correct output. This pattern solves the universal problem of generating structured text with guarantees and could be extracted for any code generation task.

file: grazel-gradle-plugin/src/main/kotlin/com/grab/grazel/bazel/starlark/ ↗ | tags: #domain-specific-language #typesafe-dsl #code-generation

Complete dependency resolution and conversion system. Handles resolving Gradle dependencies to actual artifacts, converting to Bazel-compatible format, managing transitive dependencies, and resolving version conflicts. Features topological sorting, dependency graph construction, and resolution caching. Demonstrates clean separation between collection, resolution, and conversion phases with sophisticated caching mechanisms.

file: grazel-gradle-plugin/src/main/kotlin/com/grab/grazel/gradle/dependencies/ ↗ | tags: #dependency-resolution #dependency-conversion #graph-algorithms

Android variant handling and compression system. Manages the complexity of build types, product flavors, and build variants. Provides equivalence checking and compression strategies to minimize Bazel target proliferation. Models Android variants, determines when variants can be merged, and implements algorithms to reduce target count while preserving build semantics. Addresses the combinatorial complexity of Android build configurations.

file: grazel-gradle-plugin/src/main/kotlin/com/grab/grazel/gradle/variant/ ↗ | tags: #variant-management #configuration-compression #abstraction

Dagger-based dependency injection framework implementation. Shows excellent practices for structuring a large Gradle plugin with clear separation of concerns. Provides well-defined components and modules that make the code highly testable and maintainable. Demonstrates how to properly apply DI in a Gradle plugin context for loose coupling and ease of testing.

file: grazel-gradle-plugin/src/main/kotlin/com/grab/grazel/di/ ↗ | tags: #dependency-injection #modular-architecture #testability
Last analyzed: 2026-08-04 05:45:44.943334
Next check: 2026-08-11 05:45:44.938048
$ submit: