-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
136 lines (116 loc) · 3.72 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "org.asciidoctor:asciidoctor-gradle-jvm:3.3.2"
}
}
version project.projectVersion
group "org.grails.plugins"
apply plugin: 'java-library'
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin: "org.asciidoctor.jvm.convert"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.internal.grails-plugin-publish"
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
configurations {
documentation
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.mongodb') {
details.useVersion(mongodbJavaDriverVersion)
}
}
}
dependencies {
api "org.springframework.boot:spring-boot-starter-logging"
api "org.springframework.boot:spring-boot-autoconfigure"
api "org.grails:grails-core"
api "org.grails.profiles:plugin"
api "org.grails:grails-gorm-testing-support"
api("de.flapdoodle.embed:de.flapdoodle.embed.mongo:2.2.0") {
exclude group: "commons-io"
exclude group: "org.apache.commons", module: "commons-lang3"
exclude group: "net.java.dev.jna"
exclude group: "org.slf4j"
}
api "org.grails.plugins:mongodb"
documentation "org.codehaus.groovy:groovy:$groovyVersion"
documentation "org.codehaus.groovy:groovy-ant:$groovyVersion"
documentation "org.codehaus.groovy:groovy-templates:$groovyVersion"
documentation "com.github.javaparser:javaparser-core:$javaParserCoreVersion"
}
grailsPublish {
userOrg = 'grails'
githubSlug = 'grails-plugins/grails-embedded-mongodb'
license {
name = 'Apache-2.0'
}
title = "Embedded MongoDB Plugin"
desc = "Executes an embedded mongo database for integration or functional testing"
developers = [jameskleeh: "James Kleeh", puneetbehl: "Puneet Behl"]
}
asciidoctor {
resources {
from('src/docs/images')
into "./images"
}
attributes 'experimental' : 'true',
'compat-mode' : 'true',
'toc' : 'left',
'icons' : 'font',
'version' : project.version,
'groupId' : project.group,
'artifactId' : project.name,
'sourcedir' : "${projectDir}/src/main/groovy"
}
def apidocs = tasks.register("apidocs", Groovydoc) {
group = "documentation"
source project.files('src/main/groovy')
destinationDir = new File(buildDir, 'docs/api')
// Might need a classpath
docTitle = "Embedded MongoDB Grails Plugin ${version}"
classpath = configurations.documentation
groovyClasspath = configurations.documentation
}
def docs = tasks.register("docs", Copy) {
group = "documentation"
dependsOn = ["apidocs", "asciidoctor"]
from "$buildDir/asciidoc/html5"
into "$buildDir/docs"
}
bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
tasks.withType(Test) {
useJUnitPlatform()
}
test {
testLogging {
events "passed", "skipped", "failed"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
}
}
bootJar.enabled = false