gradle java plugin
Java gradle plugin for Ekino projects
Overview
This plugin configures the following tasks for any Ekino Java project:
- Apply the Gradle Java plugin
- Set the source/target compatibility to
11
java version - Define the
integrationTest
source set (it
directory) : unbroken-dome/gradle-testsets-plugin - Define the test report files aggregation
- Replace
${project-version}
and${project-description}
in YAML files by the gradle project version - Define JUnit Platform configuration for JUnit 5 (Jupiter)
Requirement
You need to have a JDK 8 at least.
Gradle 5.6.4 or newer is required.
Nota Bene : some build variables may cause error for launching the gradle command. You have to add a gradle.properties
file to the ~/.gradle
folder under your home directory with following configuration :
publishingBaseUrl=<NEXUS_BASE_URL>
publishingLogin=<NEXUS_LOGIN>
publishingPassword=<NEXUS_PASSWORD>
<NEXUS_BASE_URL> is the Nexus prefix URL without the repository name, finishing with a dash '/'.
Build
This will create the JAR and run the tests
./gradlew build
Publish locally
This will publish the JAR in your local Maven repository
./gradlew publishToMavenLocal
Usage
Add the plugin in your Gradle build script:
Groovy
plugins {
id "com.ekino.oss.gradle.plugin.java" version "1.0.2"
}
Kotlin
plugins {
id("com.ekino.oss.gradle.plugin.java") version "1.0.2"
}
You can override Java version using a dedicated configuration (default is 11):
javaPlugin {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}