Skip to content

Commit 942a4e3

Browse files
committed
refactor: use gradle instead of maven
1 parent 27db1e2 commit 942a4e3

9 files changed

Lines changed: 469 additions & 152 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea
22
target
3-
*.iml
3+
*.iml
4+
build
5+
.gradle

DEVELOPERS.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

build.gradle

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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+
}

gradle/wrapper/gradle-wrapper.jar

60.1 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
4+
networkTimeout=10000
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

gradlew

Lines changed: 244 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)