-
Notifications
You must be signed in to change notification settings - Fork 439
/
build.gradle
154 lines (125 loc) · 4.14 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 {
ext {
set("jacksonVersion", "2.13.4")
set("springVersion", "5.3.23")
set("springBotVersion", "2.7.4")
set("jettyVersion", "9.4.49.v20220914")
set("slf4jVersion", "2.0.3")
}
repositories {
gradlePluginPortal()
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
classpath("com.adarshr:gradle-test-logger-plugin:1.6.0")
}
}
plugins {
id('jacoco')
}
repositories {
mavenLocal()
gradlePluginPortal()
mavenCentral()
jcenter()
}
apply plugin: "java"
apply plugin: "com.adarshr.test-logger"
group = "com.github.briandilley.jsonrpc4j"
version = "1.6.1-SNAPSHOT"
description = """
This project aims to provide the facility to easily implement JSON-RPC for the java programming language.
"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
ext {
releaseVersion = !version.toString().endsWith('-SNAPSHOT')
}
test {
testLogging {
exceptionFormat = "FULL"
showExceptions = true
showStackTraces = true
showCauses = true
}
maxParallelForks = 1
forkEvery = 1
maxHeapSize = "2g"
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.5"
}
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
csv.enabled true
html.enabled true
}
}
java {
registerFeature('servletSupport') {
usingSourceSet(sourceSets.main)
}
registerFeature('springSupport') {
usingSourceSet(sourceSets.main)
}
}
dependencies {
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
// TODO: remove deprecated portlet-api when support is removed from the code
servletSupportImplementation 'javax.portlet:portlet-api:3.0.1'
servletSupportImplementation 'javax.servlet:javax.servlet-api:4.0.1'
// TODO: Jakarta EE 9 and jakarta.servlet-api 5.x are still compatible with Java SE 8,
// update jakarta.servlet-api to version 6+ when JDK baseline is increased to 11+
servletSupportImplementation 'jakarta.servlet:jakarta.servlet-api:5.0.0'
implementation group: 'jakarta.jws', name: 'jakarta.jws-api', version: '3.0.0'
implementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
implementation "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
springSupportImplementation "org.springframework:spring-core:${springVersion}"
springSupportImplementation "org.springframework:spring-context:${springVersion}"
springSupportImplementation "org.springframework:spring-web:${springVersion}"
springSupportImplementation "org.springframework:spring-webmvc:${springVersion}"
implementation 'commons-codec:commons-codec:1.15'
implementation 'org.apache.httpcomponents:httpcore-nio:4.4.15'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.easymock:easymock:4.3'
testImplementation("org.springframework.boot:spring-boot-starter-web:${springBotVersion}") {
exclude module: 'logback-classic'
}
testImplementation "org.springframework.boot:spring-boot-starter-test:${springBotVersion}"
testImplementation("org.eclipse.jetty:jetty-server:${jettyVersion}") {
exclude module: 'javax.servlet'
}
testImplementation("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
exclude module: 'org.eclipse.jetty.orbit'
}
testRuntime 'org.apache.logging.log4j:log4j-slf4j-impl:2.19.0'
testRuntime 'org.apache.logging.log4j:log4j-core:2.19.0'
}
jar {
manifest {
attributes 'Automatic-Module-Name': 'jsonrpc4j'
}
}
task documentationJar(type: Jar) {
archiveClassifier.set("javadoc")
from javadoc
}
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
artifacts {
archives documentationJar, sourcesJar
}
apply from: 'publishing.gradle'