Giter Site home page Giter Site logo

java-build-tool-bazel-demo's Introduction

Java Build Tool Bazel Demo

Bazel是一种支持多语言混合编译的构建工具。

这里是最简单的Java例子,没有用到第三方库,只是打印出一句话。

注意:

  1. WORKSPACE文件是用来表示当前项目是一个可能包含多个package的workspace
  2. BUILD文件表示所在目录是一个package,可以在里面使用一种类似python的语言starlark进行配置。 每个包含BUILD文件的目录都是一个package,内部可以使用不同语言实现功能
  3. BUILD中,java_binaryname应该是有main方法的文件的准确名字,可以自动找到并执行;否则还需要另行指定main_class
brew install bazel
bazel build :Hello
./bazel-bin/Hello

bazel build :hello2
./bazel-bin/hello2

将会打印出Hello

java-build-tool-bazel-demo's People

Contributors

freewind avatar

Stargazers

Yu Zeng avatar

Watchers

James Cloos avatar

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.