Giter VIP home page Giter VIP logo

java_tools's Introduction

Bazel Tools for Java

This is a repository for the tools used by Bazel to compile Java.

The source code of the Bazel Tools for Java is currently checked in the bazel repository. The source code will be moved incrementally to this repository.

Upgrade a Bazel project to use custom java_tools version

To use a specific java_tools release in your Bazel project please add the http_archive definitions in your WORKSPACE file.

For Bazel versions above 4.0.0, use java_tools releases >= v11. No additional options are needed.

For Bazel versions <= 4.0.0 use java_tools releases <= v10 and set the options --java_toolchain and/or --host_java_toolchain accordingly.

All java_tools releases can be found under https://github.com/bazelbuild/java_tools/releases.

Releases

The releases can be found under java_tools/releases. For previous releases see the issues marked with the release label.

If you're interested in the release process please see docs/release.md

java_tools's People

Contributors

comius avatar davido avatar fweikert avatar hvadehra avatar iirina avatar keertk avatar shreem01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java_tools's Issues

release: java_tools_javac9-v3.0

The new release:

  • fixes bazelbuild/bazel#8614
  • exposes a new toolchain @java_tools//:prebuilt_toolchain which is using all the pre-built tools, including singlejar and ijar, even on remote execution. This toolchain should be used only when host and execution platform are the same, otherwise the binaries will not work on the execution platform.

This issue follows the java_tools release process.

release candidates can be found under bazel_java_tools/release_candidates/javac9/v3.0

release: java_tools javac9-v4.0, javac10-v5.0, javac12-v3.0

A new release for java_tools embedding javac9, javac10, javac12 is needed to be compatible with bazel 1.1 and later.

The 3 releases will have the same bazel commits as javac11-v6.0 (#17):

  • baseline fe67c70cc43d910465dc415286118a81ad7eece4
  • cherry-pick fe67c70cc43d910465dc415286118a81ad7eece4

The releases can be cut on branch iirina:java-tools-cherry-pick-v6.1 and commit 52a920610cc997f979c9304c1df9250a2e80ecf8. The build java_tools binaries pipeline is https://buildkite.com/bazel-trusted/java-tools-binaries-java/builds/123. These are the same commits and builds as in #17 (comment).

Release: java_tools v11.0

This release splits java_tools into platform independent and prebuilt part. Toolchain definitions are moved from java_tools to bazel repository.

README.md requested improvement

Please modify the README.md so that it shows the exact command needed to check out the Java tools commit. For older releases I was able to just execute "git checkout SHA" because the commit was accessible from master or some other public branch. Recently, I've needed to do "git fetch http://github.com/bazelbuild/bazel.git SHA && git checkout SHA". It would have been helpful if that sequence were in the README.md file, so I could just paste it into my shell.
Thanks!

Release darwin aarch64 archives

Only x86_64 versions of java_tools exist. M1 macs are becoming the preferred machine for a lot of developers. Ideally there should be architecture specific releases.

Wrong url listed in 8.0 release notes

The release notes state that, in order to override versions you can specify a github url:
"https://github.com/bazelbuild/java_tools/releases/download/javac11-8.0/java_tools_javac11_linux-v8.0.zip",

This does not resolve, and should be changed to https://github.com/bazelbuild/java_tools/releases/download/javac11_8.0/java_tools_javac11_linux-v8.0.zip

It looks like the previous releases were released with javac11-<version>, but 8.0. with _.

Document how to use these toolchains

This snippet was suggested for the bazel 3.5 release notes. It should be really be with the 14.0 release description.

# Java tools javac14 for Darwin
http_archive(
    name = "remote_java_tools_darwin",
    sha256 = "e20f002ceb3f3353d64c022e1f3400d8539ee56ffcfd4a6680d73d6a2cac938b",
    urls = [
        "https://mirror.bazel.build/bazel_java_tools/releases/javac14/v1.0/java_tools_javac14_darwin-v1.0.zip",
        "https://github.com/bazelbuild/java_tools/releases/download/javac14-v1.0/java_tools_javac14_darwin-v1.0.zip",
    ],
)

# Zulu OpenJDK for Darwin
http_archive(
    name = "openjdk14_darwin_archive",
    build_file_content = "java_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])",
    sha256 = "088bd4d0890acc9f032b738283bf0f26b2a55c50b02d1c8a12c451d8ddf080dd",
    strip_prefix = "zulu14.28.21-ca-jdk14.0.1-macosx_x64",
    urls = ["https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-macosx_x64.tar.gz"],
)

And invoke the build with these parameters:

$ bazel build \
     --java_toolchain=@remote_java_tools_darwin//:toolchain_jdk_14 \
     --host_java_toolchain=@remote_java_tools_darwin//:toolchain_jdk_14 \
     --javabase=@openjdk14_darwin_archive//:runtime \
     --host_javabase=@openjdk14_darwin_archive//:runtime \
   :foo

release: java_tools_javac11-v4.0

The new release:

  • fixes bazelbuild/bazel#8614
  • exposes a new toolchain @java_tools//:prebuilt_toolchain which is using all the pre-built tools, including singlejar and ijar, even on remote execution. This toolchain should be used only when host and execution platform are the same, otherwise the binaries will not work on the execution platform.

This issue follows the java_tools release process.

release candidates can be found under bazel_java_tools/release_candidates/javac11/v4.0

release: java_tools_javac10-v5.0

The new release:

  • fixes bazelbuild/bazel#8614
  • exposes a new toolchain @java_tools//:prebuilt_toolchain which is using all the pre-built tools, including singlejar and ijar, even on remote execution. This toolchain should be used only when host and execution platform are the same, otherwise the binaries will not work on the execution platform.

This issue follows the java_tools release process.

release candidates can be found under bazel_java_tools/release_candidates/javac10/v5.0

release: java_tools_javac12-v2.0

The new release:

  • fixes bazelbuild/bazel#8614
  • exposes a new toolchain @java_tools//:prebuilt_toolchain which is using all the pre-built tools, including singlejar and ijar, even on remote execution. This toolchain should be used only when host and execution platform are the same, otherwise the binaries will not work on the execution platform.

This issue follows the java_tools release process.

release candidates can be found under bazel_java_tools/release_candidates/javac12/v2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.