-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
160 lines (134 loc) · 4.72 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
import javax.naming.ConfigurationException
ext {
junitVersion = '5.8.2'
assertjVersion = '3.22.0'
lombokVersion = '1.18.22'
log4jVersion = '2.17.1'
logbackVersion = '1.2.10'
isReleaseVersion = !version.endsWith('SNAPSHOT')
sonatypeUsername = project.findProperty('sonatype.username')
sonatypePassword = project.findProperty('sonatype.password')
}
// 'core' must configured first, because the other modules depend on it's test output
project(':assertj-logging-core') {
apply plugin: 'java'
}
subprojects {
group = 'de.neuland-bfi'
version = '0.5.0'
repositories {
mavenCentral()
}
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
compileJava {
sourceCompatibility = '11'
targetCompatibility = '11'
}
dependencies {
api "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
api "org.assertj:assertj-core:${assertjVersion}"
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
if (it.name != 'assertj-logging-core') {
dependencies {
api project(':assertj-logging-core')
testImplementation project(':assertj-logging-core').sourceSets.test.output
}
}
java {
withSourcesJar()
withJavadocJar()
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'AssertJ Logging'
description = 'Logging Assertions for JUnit 5 and AssertJ'
url = 'https://github.com/neuland/assertj-logging'
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'c.stuht'
name = 'Christian Stuht'
email = '[email protected]'
}
developer {
id = 'a.grimm'
name = 'Achim Grimm'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/neuland/assertj-logging.git'
developerConnection = 'scm:git:https://github.com/neuland/assertj-logging.git'
url = 'scm:git:https://github.com/neuland/assertj-logging.git'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/neuland/assertj-logging/issues'
}
}
}
}
repositories {
maven {
name = 'Sonatype'
if (isReleaseVersion) {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
} else {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask('publish') }
sign publishing.publications.mavenJava
}
tasks.withType(PublishToMavenRepository) {
doFirst {
if (!sonatypeUsername) {
throw new ConfigurationException(
'Please set the Sonatype username with project property "sonatype.username"')
}
if (!sonatypePassword) {
throw new ConfigurationException(
'Please set the Sonatype password with project property "sonatype.password"')
}
}
}
}
project(':assertj-logging-log4j') {
dependencies {
implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
}
}
project(':assertj-logging-logback') {
dependencies {
implementation "ch.qos.logback:logback-classic:${logbackVersion}"
}
}
wrapper {
gradleVersion = '7.3.3'
distributionType = 'BIN'
}