mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 15:25:49 +00:00
Gradle - new task (open Tests in browser), set no tracking for axiom plugin
This commit is contained in:
parent
30784e90c1
commit
ced6ed9d30
1 changed files with 31 additions and 2 deletions
33
build.gradle
33
build.gradle
|
@ -1,3 +1,5 @@
|
||||||
|
import java.awt.Desktop
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'org.springframework.boot' version '3.2.0'
|
id 'org.springframework.boot' version '3.2.0'
|
||||||
|
@ -5,16 +7,20 @@ plugins {
|
||||||
id 'org.graalvm.buildtools.native' version '0.9.28'
|
id 'org.graalvm.buildtools.native' version '0.9.28'
|
||||||
id 'io.spring.javaformat' version '0.0.41'
|
id 'io.spring.javaformat' version '0.0.41'
|
||||||
id "io.spring.nohttp" version "0.0.11"
|
id "io.spring.nohttp" version "0.0.11"
|
||||||
|
// axion plugin for managing versions
|
||||||
|
id 'pl.allegro.tech.build.axion-release' version '1.15.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'checkstyle'
|
apply plugin: 'checkstyle'
|
||||||
apply plugin: 'io.spring.javaformat'
|
apply plugin: 'io.spring.javaformat'
|
||||||
|
apply plugin: 'pl.allegro.tech.build.axion-release'
|
||||||
|
|
||||||
gradle.startParameter.excludedTaskNames += [ "checkFormatAot", "checkFormatAotTest" ]
|
gradle.startParameter.excludedTaskNames += [ "checkFormatAot", "checkFormatAotTest" ]
|
||||||
|
|
||||||
group = 'org.springframework.samples'
|
group = 'org.springframework.samples'
|
||||||
version = '3.2.0'
|
|
||||||
|
version = scmVersion {}.version
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
@ -64,14 +70,37 @@ checkstyle {
|
||||||
checkstyleNohttp {
|
checkstyleNohttp {
|
||||||
configDirectory = project.file('src/checkstyle')
|
configDirectory = project.file('src/checkstyle')
|
||||||
configFile = file('src/checkstyle/nohttp-checkstyle.xml')
|
configFile = file('src/checkstyle/nohttp-checkstyle.xml')
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("formatMain").configure { dependsOn("checkstyleMain") }
|
tasks.named("formatMain").configure { dependsOn("checkstyleMain") }
|
||||||
tasks.named("formatMain").configure { dependsOn("checkstyleNohttp") }
|
tasks.named("formatMain").configure { dependsOn("checkstyleNohttp") }
|
||||||
|
|
||||||
tasks.named("formatTest").configure { dependsOn("checkstyleTest") }
|
tasks.named("formatTest").configure { dependsOn("checkstyleTest") }
|
||||||
tasks.named("formatTest").configure { dependsOn("checkstyleNohttp") }
|
tasks.named("formatTest").configure { dependsOn("checkstyleNohttp") }
|
||||||
|
|
||||||
|
//custom task
|
||||||
|
tasks.register('openTestResults') {
|
||||||
|
group = "Verification"
|
||||||
|
description = "Opens web browser with index.html from test directory"
|
||||||
|
dependsOn('build')
|
||||||
|
dependsOn('test')
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named('currentVersion') {
|
||||||
|
doNotTrackState("Allegro axiom plugin does not work with tracking state ")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named('openTestResults'){
|
||||||
|
|
||||||
|
doLast {
|
||||||
|
exec {
|
||||||
|
workingDir './build/reports/tests/test'
|
||||||
|
|
||||||
|
commandLine 'cmd', '/c', 'start index.html'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
checkstyleAot.enabled = false
|
checkstyleAot.enabled = false
|
||||||
checkstyleAotTest.enabled = false
|
checkstyleAotTest.enabled = false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue