Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: java
jdk:
- openjdk8
- openjdk11
- openjdk17
install: {}
script:
- ./gradlew assemble check
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Kovács Zoltán (https://github.com/kz282)

* Upgrade to Jackson 3.0

## Randy Watler

* Added `.parent()` to `JsonPointer` (darn useful!).
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ project for details.

## What this is

This package is meant to be used with Jackson 2.2.x. It provides the three following features:
This package is meant to be used with Jackson 3.0.x. It provides the three following features:

* write/read JSON decimal numbers using `BigDecimal` (instead of `double`) for optimal numeric
precision;
Expand All @@ -30,8 +30,8 @@ This package is meant to be used with Jackson 2.2.x. It provides the three follo

## Versions

* `jackson-coreutils` is **2.0**
* `jackson-coreutils-equivalence` is **1.0**
* `jackson-coreutils` is **2.1**
* `jackson-coreutils-equivalence` is **1.1**

Javadoc is [available
online](https://java-json-tools.github.io/jackson-coreutils/index.html).
Expand All @@ -44,8 +44,8 @@ With Gradle:

```groovy
dependencies {
compile(group: "com.github.java-json-tools", name: "jackson-coreutils", version: "2.0");
compile(group: "com.github.java-json-tools", name: "jackson-coreutils-equivalence", version: "1.0");
compile(group: "com.github.java-json-tools", name: "jackson-coreutils", version: "2.1");
compile(group: "com.github.java-json-tools", name: "jackson-coreutils-equivalence", version: "1.1");
}
```

Expand All @@ -55,12 +55,12 @@ With Maven:
<dependency>
<groupId>com.github.java-json-tools</groupId>
<artifactId>jackson-coreutils</artifactId>
<version>2.0</version>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.github.java-json-tools</groupId>
<artifactId>jackson-coreutils-equivalence</artifactId>
<version>1.0</version>
<version>1.1</version>
</dependency>
```

Expand Down
272 changes: 69 additions & 203 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,226 +17,92 @@
* - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
*/

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:4.2.0'
}
}

plugins {
id("net.ltgt.errorprone") version "0.8.1" apply false
id "java-library"
id "maven-publish"
id "signing"
id "idea"
id "eclipse"
id "com.github.ben-manes.versions" version "0.51.0"
}

allprojects {
apply(plugin: "java");
apply(plugin: "maven");
apply(plugin: "signing");
apply(plugin: "biz.aQute.bnd.builder");
apply(plugin: "idea");
apply(plugin: "eclipse");
apply(plugin: "net.ltgt.errorprone");

apply(from: "project.gradle");

group = "com.github.java-json-tools";

ext.forRelease = !version.endsWith("-SNAPSHOT");

/*
* Repositories to use
*/
repositories {
mavenCentral();
if (!forRelease) {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
/* Allow staging references for last pre-release testing. */
if (project.properties.containsKey("sonatypeUsername")) {
maven {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username = project.properties["sonatypeUsername"]
password = project.properties["sonatypePassword"]
}
}
}
}

/*
* Add errorprone checking.
*/
dependencies {
errorprone("com.google.errorprone:error_prone_core:2.3.3")
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
}

/*
* Necessary! Otherwise TestNG will not be used...
*
* Also, we don't want gradle's default HTML report: it does not support
* parameterized tests which I use a _lot_.
*/
test {
useTestNG() {
useDefaultListeners = true;
};
}

/*
* Necessary to generate the source and javadoc jars
*/
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources";
from sourceSets.main.allSource;
}

/*
* Lint all the things!
*/
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all" << "-Werror"
}
tasks.withType(Javadoc) {
options.addStringOption('Xwerror', '-quiet')
}
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc";
from javadoc.destinationDir;
}

artifacts {
archives jar;
archives sourcesJar;
archives javadocJar;
}

wrapper {
gradleVersion = "5.6.3";
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip";
}
group = "com.github.java-json-tools"
version = "2.1-SNAPSHOT"
description = "Core utility classes for Jackson"

task pom {
doLast {
pom {}.writeTo("${projectDir}/pom.xml");
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}

/*
* SIGNING
*/
repositories {
mavenCentral()
}

project.ext {
description = "JSON Pointer (RFC 6901) and numeric equality for Jackson (2.2.x)";
scmUrl = sprintf("[email protected]:java-json-tools/%s.git", rootProject.name)
projectURL = sprintf("https://github.com/java-json-tools/%s", rootProject.name);
sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/";
sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/";
};
dependencies {
api "com.google.code.findbugs:jsr305:3.0.2"
api "tools.jackson.core:jackson-databind:3.0.0"
api "com.github.java-json-tools:msg-simple:1.2"

testImplementation "org.testng:testng:7.9.0"
testImplementation "org.assertj:assertj-core:3.25.3"
testImplementation "org.mockito:mockito-core:5.11.0"
}

task checkSigningRequirements {
doLast {
def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ];
def noDice = false;
requiredProperties.each {
if (project.properties[it] == null) {
noDice = true;
System.err.printf("property \"%s\" is not defined!")
}
}
if (noDice)
throw new IllegalStateException("missing required properties for " +
"upload");
}
test {
useTestNG()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat = "full"
}
}

uploadArchives {
dependsOn(checkSigningRequirements);
repositories {
mavenDeployer {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment);
}

repository(url: "${sonatypeStaging}") {
authentication(
userName: project.properties["sonatypeUsername"],
password: project.properties["sonatypePassword"]
);
}
javadoc {
options.links("https://docs.oracle.com/en/java/javase/17/docs/api/")
}

snapshotRepository(url: "${sonatypeSnapshots}") {
authentication(
userName: project.properties["sonatypeUsername"],
password: project.properties["sonatypePassword"]
);
publishing {
publications {
mavenJava(MavenPublication) {
from components.java

pom {
name = "Jackson coreutils"
description = "A set of utility classes for use with Jackson"
url = "https://github.com/java-json-tools/jackson-coreutils"

licenses {
license {
name = "Lesser General Public License, version 3 or greater"
url = "http://www.gnu.org/licenses/lgpl.html"
}
license {
name = "Apache Software License, version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0"
}
}
}
}
}

/*
* Configure pom.xml on install, uploadArchives
*/
[
install.repositories.mavenInstaller,
uploadArchives.repositories.mavenDeployer
]*.pom*.whenConfigured { pom ->
pom.project {
name "${project.name}";
packaging "jar";
description "${project.ext.description}";
url "${projectURL}";

scm {
url "${scmUrl}";
connection "${scmUrl}";
developerConnection "scm:git:${scmUrl}";
}

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/jackson-coreutils"
connection = "scm:git:git://github.com/java-json-tools/jackson-coreutils"
}
}

developers {
developer {
id "huggsboson";
name "John Huffaker";
email "[email protected]";
developers {
developer {
id = "fge"
name = "Francis Galiegue"
email = "[email protected]"
}
}
}
}
}

signing {
required { forRelease && gradle.taskGraph.hasTask("uploadArchives") };
sign configurations.archives;
}
}

/*
* Javadoc: we need to tell where the overview.html is, it will not pick it up
* automatically...
*/

javadoc {
options.overview = "src/main/java/overview.html";
signing {
required { gradle.taskGraph.hasTask("publish") }
sign publishing.publications.mavenJava
}


21 changes: 6 additions & 15 deletions equivalence/project.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@
* Project-specific settings. Unfortunately we cannot put the name in there!
*/
group = "com.github.java-json-tools";
version = "1.0";
sourceCompatibility = JavaVersion.VERSION_1_7;
targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility
version = "1.1";
sourceCompatibility = JavaVersion.VERSION_17;
targetCompatibility = JavaVersion.VERSION_17; // defaults to sourceCompatibility

/*
* List of dependencies
*/
dependencies {
implementation(group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.11.0");
implementation(group: "com.google.guava", name: "guava", version: "28.2-android");
implementation(group: "com.github.java-json-tools", name: "jackson-coreutils", version: "2.0");
testImplementation(group: "org.testng", name: "testng", version: "7.1.0") {
api "com.github.java-json-tools:jackson-coreutils:2.1-SNAPSHOT"
testImplementation(group: "org.testng", name: "testng", version: "7.9.0") {
exclude(group: "junit", module: "junit");
exclude(group: "org.beanshell", module: "bsh");
exclude(group: "org.yaml", module: "snakeyaml");
Expand All @@ -41,14 +39,7 @@ dependencies {

javadoc {
options {
def currentJavaVersion = org.gradle.api.JavaVersion.current()
// FIXME: https://github.com/gradle/gradle/issues/11182
if (currentJavaVersion.compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
addStringOption("-release", "7");
}
links("https://docs.oracle.com/javase/7/docs/api/");
links("https://fasterxml.github.io/jackson-databind/javadoc/2.11/");
links("https://www.javadoc.io/doc/com.google.guava/guava/28.2-android/");
links("https://docs.oracle.com/en/java/javase/17/docs/api/");
links("https://java-json-tools.github.io/jackson-coreutils/");
}
}
Loading