forked from vavr-io/vavr-jackson
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
162 lines (142 loc) · 4.91 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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'checkstyle'
id 'net.researchgate.release' version "${researchgateRelease}"
id 'io.github.gradle-nexus.publish-plugin' version "${nexusPublish}"
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
group = 'io.vavr'
version = '1.0.0-SNAPSHOT'
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
implementation "io.vavr:vavr:${vavrVersion}"
implementation "com.fasterxml.jackson.core:jackson-databind:${fasterxmlVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
testImplementation "javax.xml.bind:jaxb-api:${jaxbVersion}"
testImplementation "com.squareup:javapoet:${javapoetVersion}"
testImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:${fasterxmlVersion}"
testImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${fasterxmlVersion}"
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:${fasterxmlVersion}"
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${fasterxmlVersion}"
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${fasterxmlVersion}"
testImplementation "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${fasterxmlVersion}"
testImplementation "com.fasterxml.jackson.module:jackson-module-scala_2.11:${fasterxmlVersion}"
}
test {
useJUnitPlatform()
}
tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.ALL
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
sourceSets sourceSets.main
reports {
xml.destination file("${buildDir}/reports/jacoco/report.xml")
}
}
tasks.named('check') {
dependsOn jacocoTestReport
dependsOn javadoc
}
tasks.named('jar') {
manifest {
attributes('Automatic-Module-Name': 'io.vavr')
}
}
codeCoverageReport.dependsOn {
project.test
}
jar {
manifest {
attributes(
'Automatic-Module-Name': 'io.vavr.jackson'
)
}
}
publishing {
repositories {
maven {
// A test repository which can be used to
// verify what is going to be uploaded by
// running ./gradlew publishAllPublicationsToTestRepo
name = "testRepo"
url = "${buildDir}/repo"
}
}
publications {
maven(MavenPublication) {
from components.java
pom {
name = project.name
description = "Jackson datatype module for Vavr.io"
url = 'https://www.vavr.io'
inceptionYear = "2016"
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "ruslansennov"
name = "Ruslan Sennov"
email = "ruslan.sennov@gmail.com"
}
developer {
id = "minconghuang"
name = "Mincong Huang"
email = "mincong.h@gmail.com"
}
developer {
id = "bmscomp"
name = "Said Boudjelda"
email = "bmscomp@gmail.com"
}
}
scm {
connection = "scm:git:git@github.com:vavr-io/vavr-jackson.git"
developerConnection = "scm:git:git@github.com:vavr-io/vavr-jackson.git"
url = "git@github.com:vavr-io/vavr-jackson.git"
}
}
}
}
}
// Signing configuration mandatory for Maven Central
signing {
required { !version.endsWith("-SNAPSHOT") }
publishing.publications.configureEach {
sign(it)
}
}
// Configure the publishing repositories for Maven Central
nexusPublishing {
repositories {
sonatype {
username.set(providers.systemProperty("ossrhUsername").orElse("").forUseAtConfigurationTime())
password.set(providers.systemProperty("ossrhPassword").orElse("").forUseAtConfigurationTime())
}
}
}
// Skip warnings when building with a higher version of java than 8
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc).tap {
configureEach {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
}