From 9b64307857141ab33d1c8b8525ae0a0daa41dfa9 Mon Sep 17 00:00:00 2001 From: farrell-m Date: Wed, 19 Jun 2024 15:31:34 +0100 Subject: [PATCH] update springboot, add test logger plugin --- .github/dependabot.yml | 11 +++++++++++ README.md | 1 + gradle.properties | 7 +++++-- laa-ccms-java-gradle-plugin/build.gradle | 1 + .../laa/ccms/gradle/LaaCcmsJavaGradlePlugin.groovy | 4 +++- 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a35c2aa --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "gradle" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/README.md b/README.md index c8b8df0..6154f53 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A general purpose Java plugin for LAA CCMS projects. - apply [Jacoco](https://docs.gradle.org/current/userguide/jacoco_plugin.html) plugin, and configure sensible defaults. - apply [Versions](https://github.com/ben-manes/gradle-versions-plugin) plugin, and configure the recommended versioning strategy. - apply [Checkstyle](https://docs.gradle.org/current/userguide/checkstyle_plugin.html) plugin, and configure sensible defaults. + - apply [Test Logger](https://github.com/radarsh/gradle-test-logger-plugin) plugin for better readability of test outputs. - apply [Maven Publish](https://docs.gradle.org/current/userguide/publishing_maven.html) plugin, and configure LAA CCMS repositories and credential resolution for local development and pipelines. For publishing, the repository name can be overridden by setting the `repositoryName` property in your `gradle.properties`. This is helpful when your repository name is different from your project name. - apply [Gradle Release](https://github.com/researchgate/gradle-release) plugin, and define a release tag format. diff --git a/gradle.properties b/gradle.properties index 8c7ff3e..682191d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ version=0.0.5-SNAPSHOT # org.springframework.boot:spring-boot-gradle-plugin # org.springframework.boot:spring-boot-dependencies -springBootVersion = 3.2.5 +springBootVersion = 3.3.0 # io.spring.gradle:dependency-management-plugin springBootDependencyManagementPluginVersion = 1.1.5 @@ -11,6 +11,9 @@ springBootDependencyManagementPluginVersion = 1.1.5 gradleVersionsPluginVersion = 0.51.0 # checkstyle -checkstyleVersion = 10.12.4 +checkstyleVersion = 10.17.0 + +# com.adarshr:gradle-test-logger-plugin +testLoggerPluginVersion = 4.0.0 javaVersion = 21 \ No newline at end of file diff --git a/laa-ccms-java-gradle-plugin/build.gradle b/laa-ccms-java-gradle-plugin/build.gradle index ebe28aa..1b44681 100644 --- a/laa-ccms-java-gradle-plugin/build.gradle +++ b/laa-ccms-java-gradle-plugin/build.gradle @@ -7,6 +7,7 @@ group = 'uk.gov.laa.ccms.java' dependencies { implementation "com.github.ben-manes:gradle-versions-plugin:${gradleVersionsPluginVersion}" + implementation "com.adarshr:gradle-test-logger-plugin:${testLoggerPluginVersion}" } gradlePlugin { diff --git a/laa-ccms-java-gradle-plugin/src/main/groovy/uk/gov/laa/ccms/gradle/LaaCcmsJavaGradlePlugin.groovy b/laa-ccms-java-gradle-plugin/src/main/groovy/uk/gov/laa/ccms/gradle/LaaCcmsJavaGradlePlugin.groovy index e5fbd07..8025198 100644 --- a/laa-ccms-java-gradle-plugin/src/main/groovy/uk/gov/laa/ccms/gradle/LaaCcmsJavaGradlePlugin.groovy +++ b/laa-ccms-java-gradle-plugin/src/main/groovy/uk/gov/laa/ccms/gradle/LaaCcmsJavaGradlePlugin.groovy @@ -1,5 +1,6 @@ package uk.gov.laa.ccms.gradle +import com.adarshr.gradle.testlogger.TestLoggerPlugin import com.github.benmanes.gradle.versions.VersionsPlugin import org.gradle.api.Plugin import org.gradle.api.Project @@ -14,7 +15,7 @@ import org.gradle.testing.jacoco.plugins.JacocoPlugin class LaaCcmsJavaGradlePlugin implements Plugin { private static final String JAVA_VERSION = "21" - private static final String CHECKSTYLE_VERSION = "10.12.4" + private static final String CHECKSTYLE_VERSION = "10.17.0" @Override void apply(Project target) { @@ -23,6 +24,7 @@ class LaaCcmsJavaGradlePlugin implements Plugin { target.pluginManager.apply JacocoPlugin target.pluginManager.apply VersionsPlugin target.pluginManager.apply CheckstylePlugin + target.pluginManager.apply TestLoggerPlugin target.pluginManager.apply MavenPublishPlugin target.java {