-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathbuild.gradle
More file actions
117 lines (100 loc) · 3.36 KB
/
build.gradle
File metadata and controls
117 lines (100 loc) · 3.36 KB
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
import java.time.Instant
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/restricted" }
maven {
url = 'https://repository.apache.org/content/groups/snapshots'
content {
includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
}
}
mavenLocal()
}
dependencies {
classpath platform("org.apache.grails:grails-bom:$grailsVersion")
classpath "org.apache.grails:grails-gradle-plugins"
}
}
version = projectVersion
group = "io.github.gpc"
apply plugin: 'maven-publish'
apply plugin:"org.apache.grails.gradle.grails-plugin"
apply plugin:"org.apache.grails.gradle.grails-gsp"
apply plugin: 'org.apache.grails.gradle.grails-publish'
apply plugin: 'java-library'
ext {
buildInstant = java.util.Optional.ofNullable(System.getenv("SOURCE_DATE_EPOCH"))
.filter(s -> !s.isEmpty())
.map(Long::parseLong)
.map(Instant::ofEpochSecond)
.orElseGet(Instant::now) as Instant
formattedBuildDate = DateTimeFormatter.ISO_INSTANT.format(buildInstant)
buildDate = buildInstant.atZone(ZoneOffset.UTC) // for reproducible builds
}
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/restricted" }
maven {
url = 'https://repository.apache.org/content/groups/snapshots'
content {
includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
}
}
mavenLocal()
}
dependencies {
compileOnly platform("org.apache.grails:grails-bom:$grailsVersion")
compileOnly 'org.apache.grails:grails-dependencies-starter-web'
api('org.xhtmlrenderer:flying-saucer-pdf:9.9.5')
api("org.apache.pdfbox:pdfbox:3.0.6")
testImplementation platform("org.apache.grails:grails-bom:$grailsVersion")
testImplementation "org.apache.grails:grails-testing-support-datamapping"
testImplementation "org.spockframework:spock-core"
testImplementation "org.apache.grails:grails-testing-support-web"
}
compileJava.options.release = 17
jar {
exclude "RenderingController**"
exclude "application.groovy"
exclude "*.gsp"
exclude "*.data"
exclude "gsp_*"
exclude "gsp/*"
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
}
}
groovydoc {
excludes = ['**/*GrailsPlugin.groovy', '**/Application.groovy']
}
grailsPublish {
githubSlug = 'gpc/rendering'
license {
name = 'Apache-2.0'
}
title = 'Rendering Plugin'
desc = 'Render GSPs as PDFs, JPEGs, GIFs and PNGs'
developers = [
ldaley : "Luke Daley",
graemerocher: "Graeme Rocher",
burtbeckwith: "Burt Beckwith",
sbglasius : "Søren Berg Glasius",
magx2 : "Martin",
Ari651 : "Ari Bustamante",
billgonemad : "William Malinowski",
ZacharyKlein: "Zachary Klein",
halfbaked : "Eamonn O'Connell",
codeconsole : "Scott Murphy",
]
}
compileJava.options.release = javaVersion.toInteger()
apply from: layout.projectDirectory.file('gradle/docs-config.gradle')