Skip to content

Commit 25a505d

Browse files
author
Piotr Bugara
committed
#19 Added maven-publish plugin
1 parent 727780b commit 25a505d

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

BUILD.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ below:
1717
# Build, test the package
1818
./gradlew test
1919
# Install in your local maven repository
20-
./gradlew clean install
20+
./gradlew build publishToMavenLocal
2121
```
2222

2323
If you try and play around with Gradle configuration files, in order to be

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ apply(plugin: "java");
3535
apply(plugin: "biz.aQute.bnd.builder");
3636
apply(plugin: "net.ltgt.errorprone");
3737
apply(plugin: 'org.owasp.dependencycheck');
38+
apply(plugin: 'maven-publish')
39+
apply(plugin: 'java-library')
3840
apply(from: "project.gradle");
3941

40-
group = "com.gravity9.java-json-tools";
42+
group = "com.gravity9";
4143

4244
/*
4345
* Repositories to use
@@ -100,3 +102,11 @@ wrapper {
100102
gradleVersion = "7.6.1";
101103
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip";
102104
}
105+
106+
publishing {
107+
publications {
108+
maven(MavenPublication) {
109+
from components.java
110+
}
111+
}
112+
}

project.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ project.ext.description = "JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7386)
3131
dependencies {
3232
compileOnly(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2");
3333
implementation(group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.15.2");
34-
implementation(group: 'com.jayway.jsonpath', name: 'json-path', version: '2.8.0')
35-
implementation(group: "com.github.java-json-tools", name: "msg-simple", version: "1.2");
36-
implementation(group: "com.github.java-json-tools", name: "jackson-coreutils", version: "2.0");
34+
api(group: 'com.jayway.jsonpath', name: 'json-path', version: '2.8.0')
35+
api(group: "com.github.java-json-tools", name: "msg-simple", version: "1.2");
36+
api(group: "com.github.java-json-tools", name: "jackson-coreutils", version: "2.0");
3737
testImplementation(group: "org.testng", name: "testng", version: "7.1.0") {
3838
exclude(group: "junit", module: "junit");
3939
exclude(group: "org.beanshell", module: "bsh");

0 commit comments

Comments
 (0)