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/buildSrc/src/main/groovy/gradle-plugin-conventions.gradle b/buildSrc/src/main/groovy/gradle-plugin-conventions.gradle index 2c3e1dc..74f49bf 100644 --- a/buildSrc/src/main/groovy/gradle-plugin-conventions.gradle +++ b/buildSrc/src/main/groovy/gradle-plugin-conventions.gradle @@ -8,7 +8,7 @@ java { } dependencies { - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' } diff --git a/gradle.properties b/gradle.properties index 8c7ff3e..3178eba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,15 +2,18 @@ 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.4 # io.spring.gradle:dependency-management-plugin -springBootDependencyManagementPluginVersion = 1.1.5 +springBootDependencyManagementPluginVersion = 1.1.6 # com.github.ben-manes:gradle-versions-plugin gradleVersionsPluginVersion = 0.51.0 # checkstyle -checkstyleVersion = 10.12.4 +checkstyleVersion = 10.18.1 + +# 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..5aa6086 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.18.1" @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 { @@ -31,12 +33,6 @@ class LaaCcmsJavaGradlePlugin implements Plugin { /** Test Tasks **/ - // Additional logging - target.tasks.withType(Test).configureEach { - testLogging.showStandardStreams = true - testLogging.showStackTraces = true - } - // Integration tests if (target.tasks.findByName('integrationTest') == null) { target.sourceSets { diff --git a/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-auth/build.gradle b/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-auth/build.gradle index c8d786a..11cc86d 100644 --- a/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-auth/build.gradle +++ b/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-auth/build.gradle @@ -12,7 +12,7 @@ dependencies { transitive = false } - implementation 'io.swagger.core.v3:swagger-models:2.2.22' + implementation 'io.swagger.core.v3:swagger-models:2.2.23' implementation 'org.springframework.boot:spring-boot-starter-web' @@ -25,7 +25,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-validation' - testImplementation 'org.assertj:assertj-core:3.4.1' + testImplementation 'org.assertj:assertj-core:3.26.3' } checkstyle {