11buildscript {
2- ext {
3- grailsVersion = project. grailsVersion
4- }
52 repositories {
6- mavenLocal()
73 maven { url " https://repo.grails.org/grails/core" }
84 }
95 dependencies {
10- classpath " org.grails:grails-gradle-plugin:$grailsVersion "
6+ classpath " org.grails:grails-gradle-plugin:$grailsGradlePluginVersion "
7+ classpath ' org.asciidoctor:asciidoctor-gradle-plugin:1.5.12'
118 }
129}
1310
14- plugins {
15- id ' org.asciidoctor.convert' version ' 1.5.3'
16- }
17-
18- version " 2.0.0.BUILD-SNAPSHOT"
19- // version "2.0.0.M2"
11+ version project. projectVersion
2012group " org.grails.plugins"
2113
2214apply plugin : ' java-library'
2315apply plugin :" eclipse"
2416apply plugin :" idea"
17+ apply plugin : " org.asciidoctor.convert"
2518apply plugin :" org.grails.grails-plugin"
26- apply plugin :" org.grails.grails-plugin-publish"
27-
28- ext {
29- grailsVersion = project. grailsVersion
30- gradleWrapperVersion = project. gradleWrapperVersion
31- }
19+ apply plugin :" org.grails.internal.grails-plugin-publish"
3220
3321repositories {
34- mavenLocal()
3522 maven { url " https://repo.grails.org/grails/core" }
3623}
3724
@@ -48,18 +35,18 @@ configurations.all {
4835}
4936
5037dependencies {
51- provided " org.springframework.boot:spring-boot-starter-logging"
52- provided " org.springframework.boot:spring-boot-autoconfigure"
53- provided " org.grails:grails-core"
54- profile " org.grails.profiles:plugin"
55- provided " org.grails:grails-gorm-testing-support"
38+ api " org.springframework.boot:spring-boot-starter-logging"
39+ api " org.springframework.boot:spring-boot-autoconfigure"
40+ api " org.grails:grails-core"
41+ api " org.grails.profiles:plugin"
42+ api " org.grails:grails-gorm-testing-support"
5643 api(" de.flapdoodle.embed:de.flapdoodle.embed.mongo:2.2.0" ) {
5744 exclude group : " commons-io"
5845 exclude group : " org.apache.commons" , module : " commons-lang3"
5946 exclude group : " net.java.dev.jna"
6047 exclude group : " org.slf4j"
6148 }
62- provided " org.grails.plugins:mongodb"
49+ api " org.grails.plugins:mongodb"
6350 documentation " org.codehaus.groovy:groovy-all"
6451}
6552
@@ -90,7 +77,7 @@ asciidoctor {
9077 ' sourcedir' : " ${ projectDir} /src/main/groovy"
9178}
9279
93- task apidocs ( type : Groovydoc ) {
80+ def apidocs = tasks . register( " apidocs " , Groovydoc ) {
9481 source project. files(' src/main/groovy' )
9582
9683 destinationDir = new File (buildDir, ' docs/api' )
@@ -101,7 +88,9 @@ task apidocs(type: Groovydoc) {
10188 groovyClasspath = configurations. documentation
10289}
10390
104- task docs (type :Copy , dependsOn :[apidocs, asciidoctor]) {
91+ def docs = tasks. register(" docs" , Copy ) {
92+ type = " documentation"
93+ dependsOn = [" apidocs" , " asciidoctor" ]
10594 from " $buildDir /asciidoc/html5"
10695 into " $buildDir /docs"
10796}
@@ -124,4 +113,20 @@ tasks.withType(GroovyCompile) {
124113 }
125114}
126115
116+ tasks. withType(Test ) {
117+ useJUnitPlatform()
118+ }
119+
120+ test {
121+ testLogging {
122+ events " passed" , " skipped" , " failed"
123+
124+ showExceptions true
125+ exceptionFormat " full"
126+ showCauses true
127+ showStackTraces true
128+ }
129+ }
130+
131+
127132bootJar. enabled = false
0 commit comments