forked from java-json-tools/json-patch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
141 lines (119 loc) · 4.02 KB
/
build.gradle
File metadata and controls
141 lines (119 loc) · 4.02 KB
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
/*
* Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com)
*
* This software is dual-licensed under:
*
* - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
* later version;
* - the Apache Software License (ASL) version 2.0.
*
* The text of this file and of both licenses is available at the root of this
* project or, if you have the jar distribution, in directory META-INF/, under
* the names LGPL-3.0.txt and ASL-2.0.txt respectively.
*
* Direct link to the sources:
*
* - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt
* - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
*/
plugins {
id "java-library"
id "maven-publish"
id "signing"
id "idea"
id "eclipse"
id "com.github.ben-manes.versions" version "0.51.0"
}
group = "com.github.java-json-tools"
version = "1.14-SNAPSHOT"
description = "JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7386) implementation in Java"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
api "com.github.java-json-tools:jackson-coreutils:2.1-SNAPSHOT"
api "com.github.java-json-tools:msg-simple:1.2"
api "com.google.code.findbugs:jsr305:3.0.2"
testImplementation "org.testng:testng:7.9.0"
testImplementation "org.assertj:assertj-core:3.25.3"
testImplementation "org.mockito:mockito-core:5.11.0"
}
test {
useTestNG()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat = "full"
}
}
javadoc {
options.links("https://docs.oracle.com/en/java/javase/17/docs/api/")
}
task testJar(type: Jar) {
archiveClassifier = "tests"
from sourceSets.test.output
}
configurations {
tests
}
artifacts {
tests testJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact testJar
pom {
name = "JSON Patch"
description = "JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7386) implementation in Java"
url = "https://github.com/java-json-tools/json-patch"
licenses {
license {
name = "Lesser General Public License, version 3 or greater"
url = "http://www.gnu.org/licenses/lgpl.html"
distribution = "repo"
}
license {
name = "Apache Software License, version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0"
distribution = "repo"
}
}
scm {
url = "https://github.com/java-json-tools/json-patch"
connection = "scm:git:git://github.com/java-json-tools/json-patch"
developerConnection = "scm:git:git@github.com:java-json-tools/json-patch"
}
developers {
developer {
id = "fge"
name = "Francis Galiegue"
email = "fgaliegue@gmail.com"
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.hasProperty('ossrhUsername') ? ossrhUsername : "N/A"
password = project.hasProperty('ossrhPassword') ? ossrhPassword : "N/A"
}
}
}
}
signing {
required { gradle.taskGraph.hasTask("publish") }
sign publishing.publications.mavenJava
}