/
build.gradle
127 lines (109 loc) · 3.31 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
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
}
}
plugins {
id 'org.asciidoctor.convert' version '1.5.3'
}
version "2.0.0.BUILD-SNAPSHOT"
//version "2.0.0.M2"
group "org.grails.plugins"
apply plugin: 'java-library'
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-plugin-publish"
ext {
grailsVersion = project.grailsVersion
gradleWrapperVersion = project.gradleWrapperVersion
}
repositories {
mavenLocal()
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 {
provided "org.springframework.boot:spring-boot-starter-logging"
provided "org.springframework.boot:spring-boot-autoconfigure"
provided "org.grails:grails-core"
profile "org.grails.profiles:plugin"
provided "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"
}
provided "org.grails.plugins:mongodb"
documentation "org.codehaus.groovy:groovy-all"
}
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"]
}
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"
}
task apidocs(type: Groovydoc) {
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
}
task docs(type:Copy, 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']
}
}
bootJar.enabled = false