-
Notifications
You must be signed in to change notification settings - Fork 117
/
build.gradle
154 lines (132 loc) · 4.52 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "org.asciidoctor:asciidoctor-gradle-jvm:$asciidoctorJvmVersion"
}
}
version project.projectVersion
group "org.grails.plugins"
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"java-library"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-publish"
apply plugin:"org.grails.grails-gsp"
apply plugin: "org.asciidoctor.jvm.convert"
repositories {
maven { url "https://repo.grails.org/grails/core" }
mavenCentral()
if (System.getenv("GITHUB_MAVEN_PASSWORD") && !grailsVersion.endsWith('-SNAPSHOT')) {
System.out.println("Adding Grails Core Repo for project ${project.name}")
maven {
url = 'https://maven.pkg.github.com/grails/grails-core'
credentials {
username = 'DOES_NOT_MATTER'
password = System.getenv("GITHUB_MAVEN_PASSWORD")
}
}
}
}
configurations {
documentation
}
dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")
api "org.liquibase:liquibase-core:$liquibaseHibernate5Version"
api("org.liquibase.ext:liquibase-hibernate5:$liquibaseHibernate5Version") {
exclude group: 'org.hibernate', module: 'hibernate-core'
exclude group: 'org.hibernate', module: 'hibernate-entitymanager'
exclude group: 'org.hibernate', module: 'hibernate-envers'
exclude group: 'com.h2database', module: 'h2'
}
api "org.apache.commons:commons-lang3"
api("org.grails:grails-shell") {
exclude group: 'org.slf4j', module: 'slf4j-simple'
}
compileOnly "org.springframework.boot:spring-boot-starter-logging"
compileOnly "org.springframework.boot:spring-boot-autoconfigure"
compileOnly "org.grails.plugins:hibernate5"
compileOnly "org.apache.groovy:groovy-sql"
compileOnly "org.apache.groovy:groovy-xml"
testImplementation "org.springframework.boot:spring-boot-starter-tomcat"
testImplementation "org.grails.plugins:hibernate5"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "com.h2database:h2"
documentation "org.apache.groovy:groovy"
documentation "org.apache.groovy:groovy-ant"
documentation "org.apache.groovy:groovy-templates"
documentation "com.github.javaparser:javaparser-core"
}
compileJava.options.release = 17
grailsPublish {
githubSlug = 'grails/grails-database-migration'
license {
name = 'Apache-2.0'
}
title = 'Grails Database Migration Plugin'
desc = 'Grails Database Migration Plugin'
developers = [kazukiyamamoto: "Kazuki YAMAMOTO"]
}
asciidoctor {
baseDirFollowsSourceFile()
outputDir = layout.buildDirectory.dir('asciidoc').get().getAsFile()
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",
'liquibaseHibernate5Version': liquibaseHibernate5Version
}
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
tasks.withType(Test) {
useJUnitPlatform()
}
tasks.withType(Groovydoc) {
configure {
docTitle = "Grails Database Migration Plugin ${version}"
source = project.files('src/main/groovy')
destinationDir = layout.buildDirectory.dir('docs/api').get().getAsFile()
classpath = configurations.documentation
groovyClasspath = configurations.documentation
}
}
task docs(type:Copy, group: 'documentation') {
dependsOn(groovydoc, asciidoctor)
from "${project.layout.buildDirectory.get()}/asciidoc"
into "${project.layout.buildDirectory.get()}/docs"
}
jar {
exclude "testapp/**/**"
}
test {
testLogging {
events "passed", "skipped", "failed"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
}
retry {
maxRetries = 2
maxFailures = 20
failOnPassedAfterRetry = true
filter {
excludeClasses.add("*GroovyChangeLogSpec")
}
}
}