Gradle Java
Java plugin - tasks
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'findbugs'
group = 'com.my.Project .rules'
version = '0.1.0'
description = """AWS Project Rules """
...
Project tree
project-rules/
project-rules-core/
project-rules-ws/
...
Build
see gradle java for all tasks https://docs.gradle.org/current/userguide/java_plugin.html
build all
project-rules$> gradle build -Penv=dev (env=dev/stg/prd)
build only project-rules-core
project-rules$> gradle :project-rules-core:build
build project-rules-ws
project-rules$> gradle :project-rules-ws:build -Penv=dev
Run Unit Test
project-rules$> gradle test
- test report: project-rules-ws\build\reports\tests
- findbug report: project-rules-ws\build\reports\findbugs
Generate Code Coverage Report
project-rules$> gradle test jacocoTestReport
output: project-rules\project-rules-ws\build\reports\jacoco\test\html
Run local Embedded Web Container - Jetty
project-rules$> gradle :project-rules-ws:jettyRun -Penv=stg
open url: http://localhost:8080/project-rules-ws/