All Projects → grab → Grazel

grab / Grazel

Licence: other
A tool to migrate Android projects from Gradle to Bazel incrementally and automatically

Programming Languages

kotlin
9241 projects
Starlark
911 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Grazel

dmn-check
A tool which performs static analyses on Decision Model Notation (DMN) files to detect bugs
Stars: ✭ 34 (-84.68%)
Mutual labels:  gradle-plugin
TinyPngPlugin
TinyPng gradle plugin for android
Stars: ✭ 240 (+8.11%)
Mutual labels:  gradle-plugin
GradleMongoPlugin
Gradle plugin for running a managed instance of Mongo.
Stars: ✭ 48 (-78.38%)
Mutual labels:  gradle-plugin
gradle-semantic-build-versioning
Gradle plugin to generate version-numbers and tags using semantic versioning
Stars: ✭ 19 (-91.44%)
Mutual labels:  gradle-plugin
android-build-eval
This project includes Uber-agnostic auto-generated project(s) with a comparable complexity to existing Uber Production mobile apps. These are buildable on Buck, Bazel and Gradle- therefore enable build time benchmarking.
Stars: ✭ 82 (-63.06%)
Mutual labels:  bazel
kmp-fatframework-cocoa
A Gradle plugin to generate and publish an iOs FatFramework or XCFramework on Kotlin Multiplatform projects.
Stars: ✭ 26 (-88.29%)
Mutual labels:  gradle-plugin
witness
An API controllable webcam project
Stars: ✭ 13 (-94.14%)
Mutual labels:  bazel
spotbugs-gradle-plugin
plugins.gradle.org/plugin/com.github.spotbugs
Stars: ✭ 137 (-38.29%)
Mutual labels:  gradle-plugin
bazel-nx-example
⚡ Example monorepo for Nest + Angular built with Bazel
Stars: ✭ 41 (-81.53%)
Mutual labels:  bazel
gradle-plugin-starter
Gradle plugin template project
Stars: ✭ 34 (-84.68%)
Mutual labels:  gradle-plugin
rules gitops
This repository contains rules for continuous, GitOps driven Kubernetes deployments.
Stars: ✭ 112 (-49.55%)
Mutual labels:  bazel
rules appengine
AppEngine rules for Bazel
Stars: ✭ 28 (-87.39%)
Mutual labels:  bazel
gradle-cpd-plugin
Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Stars: ✭ 88 (-60.36%)
Mutual labels:  gradle-plugin
rules sass
Sass rules for Bazel
Stars: ✭ 47 (-78.83%)
Mutual labels:  bazel
wollemi
No description or website provided.
Stars: ✭ 25 (-88.74%)
Mutual labels:  bazel
bazel-compile-commands-extractor
Goal: Enable awesome tooling for Bazel users of the C language family.
Stars: ✭ 295 (+32.88%)
Mutual labels:  bazel
bazel-website
Website for Bazel, a fast, scalable, multi-language and extensible build system
Stars: ✭ 16 (-92.79%)
Mutual labels:  bazel
harmonica
Kotlin Database Migration Tool. This tool makes it really easy to create table, index, add columns, and so on, with Kotlin DSL.
Stars: ✭ 123 (-44.59%)
Mutual labels:  gradle-plugin
boost
Boost Maven and Gradle plugins for MicroProfile development
Stars: ✭ 27 (-87.84%)
Mutual labels:  gradle-plugin
gradle-j2cl-plugin
Gradle J2CL Plugin
Stars: ✭ 18 (-91.89%)
Mutual labels:  gradle-plugin

Grazel

Grazel stands for Gradle to Bazel. A Gradle plugin to migrate Android projects to Bazel build system in an incremental and automated fashion.

Maven Central

Components

  • Gradle plugin
  • A Kotlin Starlark DSL to generate Starlark code in a type-safe way.
  • Grab Bazel Common - Custom rules to bridge the gap between Gradle/Bazel.

Features

  • Generate BUILD.bazel, WORKSPACE for given Android project and reduce the overall migration effort.
  • Setup hybrid build to build part of project graph to build with Bazel and rest with Gradle.
  • Minimal source changes to codebase - supported by Grab Bazel Common.
  • Gradle Configuration as source of truth.

For documentation and usage instructions, please visit website.

How it works

It works by automatically generating Bazel scripts for given Android project based on your Gradle configuration. For simple projects, it should be able to migrate, fully build and launch the app with bazel mobile-install //<target-name>.

For example, for the following Gradle configuration:

apply plugin: "com.android.library"
apply plugin: "kotlin-android"

android {
    compileSdkVersion rootProject.compileSdk
    defaultConfig {
        minSdkVersion rootProject.minSdk
        targetSdkVersion rootProject.targetSdk
        versionCode 1
        versionName "1.0"
    }
}

dependencies {
    implementation project(":app")
    implementation project(":base")
    implementation "androidx.test.espresso:espresso-idling-resource:3.2.0"
}

Grazel's migrateToBazel task generates the following build script:

load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library")

kt_android_library(
    name = "quiz",
    srcs = glob([
        "src/main/java/**/*.kt",
    ]),
    custom_package = "com.google.samples.apps.topeka.quiz",
    manifest = "src/main/AndroidManifest.xml",
    resource_files = glob([
        "src/main/res/**",
    ]),
    visibility = [
        "//visibility:public",
    ],
    deps = [
        "//app",
        "//base",
        "@maven//:androidx_test_espresso_espresso_idling_resource",
    ],
)

See migration capabilities for supported features. In advanced cases, where entire project might not be migratable, it migrates part of the graph and sets up hybrid build where part of the graph can be built with Bazel and rest with Gradle.

Resources

License

Copyright 2022 Grabtaxi Holdings PTE LTD (GRAB)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].