Slide 1

Slide 1 text

Building Java App in 2019 2019-09-28 @Kengo_TODA / AliEaters٦ཕഈݚ #1 1

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

Purpose Tell about ‘How we build Java app with FOSS culture’ 3

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Popular Solutions Gradle, Maven, Bazel Travis CI, Circle CI, GitHub Actions Docker, docker-compose semantic-release, GitHub Probot 5

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

Check More Automatically Spotless, SonarQube (SonarCloud), revapi, LGTM, Google Errorprone, Dependabot (Maven only), Renovate textlint, RedPen, prh 9

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Other tools & services gitignore.io Plantuml with doclet selenium-jupiter, docker browsers? 12

Slide 13

Slide 13 text

Enjoy Hacking! 13