forked from spring-projects/spring-webflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
170 lines (149 loc) · 5.51 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
buildscript {
repositories {
maven { url "https://repo.spring.io/plugins-release" }
}
}
plugins {
id 'io.spring.dependency-management' version "${dependencyMgmtPluginVersion}" apply false
}
allprojects {
apply plugin: "java"
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: "io.spring.dependency-management"
dependencyManagement {
imports {
mavenBom "org.springframework:spring-framework-bom:${springVersion}"
mavenBom "org.junit:junit-bom:${junitVersion}"
}
dependencies {
dependency "jakarta.servlet:jakarta.servlet-api:${servletApiVersion}"
dependency "jakarta.servlet.jsp:jakarta.servlet.jsp-api:${jspApiVersion}"
dependency "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:${jstlApiVersion}"
dependency "jakarta.el:jakarta.el-api:${elApiVersion}"
dependency "jakarta.validation:jakarta.validation-api:${validationApiVersion}"
dependencySet(group: "org.apache.logging.log4j", version: "${log4jVersion}") {
entry 'log4j-api'
entry 'log4j-core'
entry 'log4j-slf4j-impl'
entry 'log4j-jul'
}
dependency "org.slf4j:slf4j-api:${slf4jVersion}"
dependency "org.easymock:easymock:4.3"
dependency "org.hamcrest:hamcrest:2.2"
dependency "org.apache.tomcat:tomcat-jasper-el:${tomcatJasperVersion}"
dependency "junit:junit:4.13.2"
}
}
repositories {
mavenCentral()
maven {
url "https://repo.spring.io/milestone"
}
}
test {
useJUnitPlatform()
include(["**/*Tests.class", "**/*Test.class"])
systemProperty("java.awt.headless", "true")
systemProperty("testGroups", project.properties.get("testGroups"))
}
javadoc {
options.memberLevel = JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set("sources")
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
archiveClassifier.set("javadoc")
from javadoc
}
}
subprojects { subproject ->
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:none"]
sourceSets.test.resources.srcDirs = ["src/main/java", "src/test/resources", "src/test/java"]
jar {
manifest.attributes["Implementation-Title"] = subproject.name
manifest.attributes["Implementation-Version"] = subproject.version
from("${rootProject.projectDir}/src/dist") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format("yyyy"), version: project.version)
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
"$project.name"(MavenPublication) {
from components.java
artifact tasks['sourcesJar']
artifact tasks['javadocJar']
groupId project.group
artifactId project.name
version project.version
pom {
name = project.name
description = "Apereo - Spring Webflow"
groupId = project.group
artifactId = project.name
url = 'https://github.com/apereo/spring-webflow'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'mmoayyed'
name = 'Misagh Moayyed'
email = '[email protected]'
}
}
scm {
connection = 'scm:[email protected]:apereo/spring-webflow.git'
developerConnection = 'scm:[email protected]:apereo/spring-webflow.git'
url = 'https://github.com/apereo/spring-webflow'
}
}
}
}
if (project.hasProperty("publishReleases")) {
signing {
sign publishing.publications
}
}
repositories {
if (project.hasProperty("publishReleases")) {
maven {
name "Sonatype"
url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
mavenContent {
releasesOnly()
}
credentials(PasswordCredentials)
}
}
if (project.hasProperty("publishSnapshots")) {
maven {
name "Sonatype"
url "https://oss.sonatype.org/content/repositories/snapshots/"
mavenContent {
snapshotsOnly()
}
credentials(PasswordCredentials)
}
}
}
}
}