-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
116 lines (96 loc) · 2.61 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
repositories {
mavenCentral()
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding = 'UTF-8'
java {
withSourcesJar()
withJavadocJar()
registerFeature('junit5Support') {
usingSourceSet(sourceSets.main)
}
}
dependencies {
junit5SupportImplementation "org.junit.jupiter:junit-jupiter-api:latest.release"
api "com.googlecode.java-diff-utils:diffutils:latest.release"
api "org.opentest4j:opentest4j:latest.release"
testImplementation "org.junit.jupiter:junit-jupiter:latest.release"
testImplementation "org.assertj:assertj-core:latest.release"
testImplementation "com.fasterxml.jackson.core:jackson-databind"
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
testImplementation platform("com.fasterxml.jackson:jackson-bom:latest.release")
// Filter release candidates and beta versions
components.all { ComponentMetadataDetails details ->
if (details.id.version =~ /(?i).+[-.](CANDIDATE|RC|BETA|ALPHA|M\d+).*/) {
details.status = 'milestone'
}
}
}
test {
useJUnitPlatform()
}
group = 'de.cronn'
version = System.env.ARTIFACT_VERSION ?: 'SNAPSHOT'
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
pom {
name = project.name
description = "File Based Assertions for Java"
url = "https://github.com/cronn/validation-file-assertions"
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
name = "Radosław Postołowicz"
email = "[email protected]"
}
}
scm {
url = "https://github.com/cronn/validation-file-assertions"
}
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
}
repositories {
maven {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username = project.hasProperty('nexusUsername') ? project.property('nexusUsername') : System.getenv('NEXUS_USERNAME')
password = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : System.getenv('NEXUS_PASSWORD')
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
wrapper {
gradleVersion = "7.0"
distributionType = Wrapper.DistributionType.ALL
}
dependencyLocking {
lockAllConfigurations()
}