Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Java App in 2019

Kengo TODA
September 28, 2019

Building Java App in 2019

Javaアプリケーションのビルドについて様々な側面から語るLT

Kengo TODA

September 28, 2019
Tweet

More Decks by Kengo TODA

Other Decks in Programming

Transcript

  1. whoami KengoTODA @ Works Applications CHINA FOSS Creator (715 PRs)

    SpotBugs team core member Plugin: Jenkins, SonarQube, SpotBugs, Errorprone, Maven, Gradle, semantic-release, GitHub Actions etc. Launch Self-Organized Team for Problem Solving 2
  2. FOSS culture? PR (patch) based development Let human focus on

    creative activity Bring code to discuss even unfinished work (WIP), to make topics clear (less face-to-face meeting) Automate continuous tasks such as code format, making release note, and tests before release 4
  3. Popular Solutions Gradle, Maven, Bazel Travis CI, Circle CI, GitHub

    Actions Docker, docker-compose semantic-release, GitHub Probot 5
  4. Which JDK? Much better situation than before! Java is still

    free, and you need to chose Oracle OpenJDK build or an alternative OpenJDK provider Consider which environment (especially cloud) you use to make your app running 6
  5. Manage CI config by VCS Prefer Jenkinsfile and other YAML

    format configs than GUI config provided by CI tools Easy to create CI job dynamically Each support version (branch) needs different env and test Use Maven Wrapper or Gradle Wrapper to share the version of build tool 7
  6. semantic-release Release every commits in the target branch No more

    SNAPSHOT version! Need to follow the Conventional Commits Effective even for Java tools (Maven, Gradle) Refer my blog post (2019-03-13) for detail 8
  7. Probot and Workflow Probot and GitHub Actions lets us trigger

    program by event (push, pull_request, schedule etc.) Example: rtd-bot (help for Read The Docs) Run CI tasks including test, code format checker, document generator, coverage checker and static analysis tool etc. 10
  8. Container for portable env Run test everywhere, even browser test

    Launch your app with DB in container, then launch client (browser) in host machine or another container Contributor can run test even in local env Best match with build matrix Example: sonar-findbugs 11