forked from osiegmar/billomat4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
127 lines (108 loc) · 3.33 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'checkstyle'
id 'com.github.spotbugs' version '4.5.0'
id 'idea'
}
group = 'de.siegmar'
version = '2.0.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.1'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.1'
implementation 'org.slf4j:slf4j-api:1.7.33'
testImplementation platform('org.junit:junit-bom:5.7.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'ch.qos.logback:logback-classic:1.2.10'
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
processResources {
expand(project.properties)
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
task integrationTest(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
failFast = true
}
// Required in order to run the integration tests from IntelliJ (bug?)
task integrationTestJar() {}
tasks.withType(Test) {
useJUnitPlatform()
}
idea {
module {
testSourceDirs += sourceSets.integrationTest.java.srcDirs
testResourceDirs += sourceSets.integrationTest.resources.srcDirs
}
}
tasks.matching {task -> task.name.startsWith('spotbugs')}.forEach {
it.reports {
html.enabled = true
xml.enabled = false
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "billomat4j"
from components.java
pom {
name = 'Billomat4J'
description = 'Java Software Development Kit for the Billomat API.'
url = 'https://github.com/osiegmar/billomat4j'
licenses {
license {
name = 'GNU Lesser General Public License version 3.0'
url = 'https://www.gnu.org/licenses/lgpl-3.0.txt'
}
}
scm {
connection = 'scm:git:https://github.com/osiegmar/billomat4j.git'
url = 'https://github.com/osiegmar/billomat4j'
}
developers {
developer {
id = 'osiegmar'
name = 'Oliver Siegmar'
email = 'oliver@siegmar.de'
}
}
}
}
}
repositories {
maven {
name = 'ossrh'
credentials(PasswordCredentials)
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
signing {
sign publishing.publications.mavenJava
}