1+ /*
2+ * This file was generated by the Gradle 'init' task.
3+ *
4+ * This project uses @Incubating APIs which are subject to change.
5+ */
6+
7+ plugins {
8+ id ' io.github.gradle-nexus.publish-plugin' version ' 1.3.0'
9+ id ' me.qoomon.git-versioning' version ' 6.4.1'
10+ id ' java'
11+ id ' maven-publish'
12+ id ' signing'
13+ }
14+
15+ repositories {
16+ mavenLocal()
17+ maven {
18+ url = uri(' https://repo.maven.apache.org/maven2/' )
19+ }
20+ }
21+
22+ dependencies {
23+ implementation ' com.fasterxml.jackson.core:jackson-databind:2.11.3'
24+ testImplementation ' org.junit.jupiter:junit-jupiter:5.7.1'
25+ testImplementation ' org.mockito:mockito-core:3.8.0'
26+ }
27+
28+ group = ' io.github.deblockt'
29+ description = ' json-diff'
30+ gitVersioning. apply {
31+ refs {
32+ branch(' .+' ) {
33+ version = ' ${ref}-SNAPSHOT'
34+ }
35+ tag(' (?<version>.*)' ) {
36+ version = ' ${ref.version}'
37+ }
38+ }
39+
40+ rev {
41+ version = ' ${commit}'
42+ }
43+ }
44+
45+ repositories {
46+ mavenCentral()
47+ }
48+
49+ java {
50+ withJavadocJar()
51+ withSourcesJar()
52+
53+ toolchain {
54+ languageVersion. set(JavaLanguageVersion . of(17 ))
55+ }
56+ }
57+
58+ test {
59+ useJUnitPlatform()
60+ }
61+
62+ nexusPublishing {
63+ repositories {
64+ sonatype {
65+ nexusUrl. set(uri(' https://s01.oss.sonatype.org/service/local/' ))
66+ snapshotRepositoryUrl. set(uri(' https://s01.oss.sonatype.org/content/repositories/snapshots/' ))
67+ }
68+ }
69+ }
70+
71+ publishing {
72+ publications {
73+ mavenJava(MavenPublication ) {
74+ artifactId = ' json-diff'
75+ groupId = ' io.github.deblockt'
76+
77+ from components. java
78+ pom {
79+ name = ' json-diff'
80+ description = ' A customizable lib to perform a json-diff'
81+ url = ' https://github.com/deblockt/json-diff'
82+
83+ licenses {
84+ license {
85+ name = ' The Apache License, Version 2.0'
86+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
87+ }
88+ }
89+
90+ developers {
91+ developer {
92+ id = ' deblockt'
93+ name = ' Thomas Deblock'
94+ email = ' deblock.thomas.62@gmail.com'
95+ url = ' https://github.com/deblockt'
96+ }
97+ }
98+
99+ scm {
100+ connection = ' https://github.com/deblockt/json-diff.git'
101+ developerConnection = ' https://github.com/deblockt/json-diff.git'
102+ url = ' https://github.com/deblockt/json-diff'
103+ }
104+ }
105+ }
106+ }
107+
108+ signing {
109+ def signingKey = findProperty(" signingKey" )
110+ def signingPassword = findProperty(" signingPassword" )
111+ if (signingKey != = null && signingPassword != null ) {
112+ useInMemoryPgpKeys(signingKey, signingPassword)
113+ }
114+
115+ sign publishing. publications. mavenJava
116+ }
117+ }
0 commit comments