-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
143 lines (127 loc) · 4.51 KB
/
build.gradle.kts
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
plugins {
`java-library`
id("io.freefair.lombok")
id("maven-publish")
id("com.github.hierynomus.license-report")
signing
}
group = rootProject.group
version = rootProject.version
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
tasks.getByName<Jar>("jar") {
archiveBaseName.set("markuply")
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.getByName<Javadoc>("javadoc") {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
publishing {
publications {
create<MavenPublication>("markuply") {
from(components["java"])
artifactId = "markuply"
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("Markuply")
description.set("Spring library enriching static templates with dynamic data")
url.set("https://wttech.github.io/markuply")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("tokrug")
name.set("Tomasz Krug")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/wttech/markuply.git")
url.set("https://github.com/wttech/markuply")
}
}
}
}
}
signing {
setRequired({
(!version.toString().endsWith("SNAPSHOT") && gradle.taskGraph.hasTask("publish"))
})
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["markuply"])
}
val springBootVersion = "2.4.1"
val jsoupVersion = "1.12.2"
val attoParserVersion = "2.0.5.RELEASE"
val caffeineVersion = "2.8.8"
val ioCommonsVersion = "2.8.0"
val jmhVersion = "1.19"
val injectVersion = "1"
val junitVersion = "5.6.0"
val junitRunnerVersion = "1.6.0"
val assertVersion = "3.11.1"
val mockServerVersion = "4.9.0";
dependencies {
// Spring Boot
implementation(platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}"))
api("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-aop")
// to force lombok annotation processor execution before configuration metadata
annotationProcessor("org.projectlombok:lombok:1.18.16")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}")
annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor:${springBootVersion}")
// HTML parsers
implementation("org.jsoup:jsoup:${jsoupVersion}")
implementation("org.attoparser:attoparser:${attoParserVersion}")
implementation("commons-io:commons-io:${ioCommonsVersion}")
// Caching
api("com.github.ben-manes.caffeine:caffeine:${caffeineVersion}")
// for @Inject annotation
implementation("javax.inject:javax.inject:${injectVersion}")
// Junit 5
testImplementation("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
testImplementation("org.junit.platform:junit-platform-runner:${junitRunnerVersion}")
testImplementation("org.assertj:assertj-core:${assertVersion}")
testImplementation("com.squareup.okhttp3:mockwebserver:${mockServerVersion}")
// Spring
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude("org.junit.vintage", "junit-vintage-engine")
}
testImplementation("io.projectreactor:reactor-test")
// JMH
testImplementation("org.openjdk.jmh:jmh-core:${jmhVersion}")
testAnnotationProcessor("org.openjdk.jmh:jmh-generator-annprocess:${jmhVersion}")
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging.showStandardStreams = true
}
tasks {
downloadLicenses {
includeProjectDependencies = true
dependencyConfiguration = "runtimeClasspath"
}
}