All Projects → bazelbuild → migration-tooling

bazelbuild / migration-tooling

Licence: Apache-2.0 license
Migration tools for Bazel

Programming Languages

java
68154 projects - #9 most used programming language
python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to migration-tooling

sbt-bazel
Easily convert SBT projects to Bazel workspaces
Stars: ✭ 55 (+37.5%)
Mutual labels:  bazel
rules helm
rules_helm: Bazel rules for managing helm charts
Stars: ✭ 46 (+15%)
Mutual labels:  bazel
rules scala
Robust and featureful Bazel rules for Scala
Stars: ✭ 62 (+55%)
Mutual labels:  bazel
stuff
All stuff in a single repo (tests, ideas, benchmarks)
Stars: ✭ 13 (-67.5%)
Mutual labels:  bazel
buildkube
Bazel Remote Cache + Remote Execution in Kubernetes
Stars: ✭ 60 (+50%)
Mutual labels:  bazel
containers by bazel
Container images created with Bazel
Stars: ✭ 32 (-20%)
Mutual labels:  bazel
eclipse
Eclipse For Bazel (deprecated, see https://github.com/salesforce/bazel-eclipse instead)
Stars: ✭ 31 (-22.5%)
Mutual labels:  bazel
grab-bazel-common
Common rules and macros for Grab's Android projects built with Bazel.
Stars: ✭ 20 (-50%)
Mutual labels:  bazel
toktok-stack
A snapshot of the complete software stack (excluding some external libraries and programs)
Stars: ✭ 12 (-70%)
Mutual labels:  bazel
monorepo-base
A Bazel monorepo with an example service using gRPC + Go + Protobuf, deployable to GCP via Kubernetes.
Stars: ✭ 49 (+22.5%)
Mutual labels:  bazel
copr-build-bazel
copr build of bazel | https://copr.fedorainfracloud.org/coprs/vbatts/bazel/
Stars: ✭ 14 (-65%)
Mutual labels:  bazel
vim-ft-bzl
No description or website provided.
Stars: ✭ 26 (-35%)
Mutual labels:  bazel
tensorflow-builds
Tensorflow binaries and Docker images compiled with GPU support and CPU optimizations.
Stars: ✭ 15 (-62.5%)
Mutual labels:  bazel
vim-bazel
Vim support for Bazel
Stars: ✭ 118 (+195%)
Mutual labels:  bazel
rules verilator
Bazel build rules for Verilator
Stars: ✭ 14 (-65%)
Mutual labels:  bazel
vim-bazel
Trigger bazel from vim and load errors into the quickfix list
Stars: ✭ 15 (-62.5%)
Mutual labels:  bazel
rules elm
Bazel rules for building web applications written in Elm
Stars: ✭ 22 (-45%)
Mutual labels:  bazel
tools jvm autodeps
Automatic Dependency Management Tools for JVM Languages
Stars: ✭ 48 (+20%)
Mutual labels:  bazel
real-world-bazel
The real world Angular example app moved to Bazel
Stars: ✭ 91 (+127.5%)
Mutual labels:  bazel
bazel worker
Dart integration for Bazel build system
Stars: ✭ 18 (-55%)
Mutual labels:  bazel

DEPRECATED

This project is deprecated. Use build-deps instead.

Build status

Migration tooling

This repository contains tools used for migrating existing projects to Bazel.

Maven-to-Bazel

To migrate a Maven project to Bazel, build:

bazel run //generate_workspace -- --maven_project=/path/to/maven/project

This will create a file generate_workspace.bzl. Copy it to your workspace and add the following to your WORKSPACE file:

load("//:generate_workspace.bzl", "generated_maven_jars")
generated_maven_jars()

Then you can access any of the jars in generate_workspace.bzl.

Optionally, add the following to a BUILD file:

load("//:generate_workspace.bzl", "generated_java_libraries")
generated_java_libraries()

Then you can access any of the Java library targets in generate_workspace.bzl, which export each jar's dependencies as well as the jar itself.

transitive_maven_jar

The transitive_maven_jar repository rule exposes the specified Maven jars, as well as their transitive dependencies under one target. This alleviates the need to run generate_workspace whenever dependencies change. However, it comes at the cost of re-fetching dependencies.

As a prerequisite for use, you must have bazel 0.5.2 or later installed. In addition, add the following to your WORKSPACE file:

http_archive(
	name = "trans_maven_jar",
	url = "https://github.com/bazelbuild/migration-tooling/archive/master.zip",
	type = "zip",
	strip_prefix = "migration-tooling-master",
)

load("@trans_maven_jar//transitive_maven_jar:transitive_maven_jar.bzl", "transitive_maven_jar")

Now, within your WORKSPACE file, you can define your external maven dependencies as follows

transitive_maven_jar(
	name = "dependencies",
	artifacts = [
		"something:something:4.0",
		"otherthing:otherthing:3.2",
		...
	]
)

load("@dependencies//:generate_workspace.bzl", "generated_maven_jars")
generated_maven_jars()

The transitive_maven_jar rule will resolve the transitive dependencies for the specified artifacts and then it will generate a generate_workspace.bzl which you must load in your WORKSPACE file.

Code

This code was inspired by the aether examples for walking maven dependencies.

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].