forked from deblockt/json-diff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
117 lines (100 loc) · 2.87 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
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
id 'me.qoomon.git-versioning' version '6.4.1'
id 'java'
id 'maven-publish'
id 'signing'
}
repositories {
mavenLocal()
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}
dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.3'
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
testImplementation 'org.mockito:mockito-core:3.8.0'
}
group = 'io.github.deblockt'
description = 'json-diff'
gitVersioning.apply {
refs {
branch('.+') {
version = '${ref}-SNAPSHOT'
}
tag('(?<version>.*)') {
version = '${ref.version}'
}
}
rev {
version = '${commit}'
}
}
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
test {
useJUnitPlatform()
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri('https://s01.oss.sonatype.org/service/local/'))
snapshotRepositoryUrl.set(uri('https://s01.oss.sonatype.org/content/repositories/snapshots/'))
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'json-diff'
groupId = 'io.github.deblockt'
from components.java
pom {
name = 'json-diff'
description = 'A customizable lib to perform a json-diff'
url = 'https://github.com/deblockt/json-diff'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'deblockt'
name = 'Thomas Deblock'
email = '[email protected]'
url = 'https://github.com/deblockt'
}
}
scm {
connection = 'https://github.com/deblockt/json-diff.git'
developerConnection = 'https://github.com/deblockt/json-diff.git'
url = 'https://github.com/deblockt/json-diff'
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
if (signingKey !== null && signingPassword != null) {
useInMemoryPgpKeys(signingKey, signingPassword)
}
sign publishing.publications.mavenJava
}
}