Add Jackson 3 plugin and migrate publishing to maven-publish#185
Open
Sboti03 wants to merge 3 commits intoorigin-energy:masterfrom
Open
Add Jackson 3 plugin and migrate publishing to maven-publish#185Sboti03 wants to merge 3 commits intoorigin-energy:masterfrom
Sboti03 wants to merge 3 commits intoorigin-energy:masterfrom
Conversation
jackmatt2
reviewed
Apr 18, 2026
| mavenCentral() | ||
| } | ||
|
|
||
| if (subproject.name == 'java-snapshot-testing-plugin-jackson3') { |
Member
There was a problem hiding this comment.
Why is this long if else needed as it wasn't required previously? Will the code work without it?
| relocate 'org.opentest4j', 'shadow.org.opentest4j' | ||
| exclude "module-info.class" | ||
| archiveClassifier = '' | ||
| if (subproject.name != 'java-snapshot-testing-plugin-jackson3') { |
Member
There was a problem hiding this comment.
Why is jackson3 skipping shadowing?
| compileOnly "org.slf4j:slf4j-api:${project.slf4jVersion}" | ||
| } | ||
|
|
||
| // Add verbose logging for Github Actions |
| compileOnly 'org.projectlombok:lombok:1.18.20' | ||
| annotationProcessor 'org.projectlombok:lombok:1.18.20' | ||
| testCompileOnly 'org.projectlombok:lombok:1.18.20' | ||
| testAnnotationProcessor 'org.projectlombok:lombok:1.18.20' |
Member
There was a problem hiding this comment.
Where are the lombok deps coming in now?
| // slf4j logging implementation if you don't already have one | ||
| testImplementation("org.slf4j:slf4j-simple:2.0.0-alpha0") | ||
|
|
||
| // Optional: Many will want to serialize into JSON. In this case you should also add the Jackson plugin |
Member
There was a problem hiding this comment.
Jackson 3 should come first now. Update comment for jackson2 as targeting jackson version 2
| serializer.json=au.com.origin.snapshots.jackson.serializers.v1.JacksonSnapshotSerializer | ||
| serializer.orderedJson=au.com.origin.snapshots.jackson.serializers.v1.DeterministicJacksonSnapshotSerializer | ||
|
|
||
| # Jackson 3 alternative |
Member
There was a problem hiding this comment.
Jackson3 should now be the preferred. Update comment on Jackson2 to make it clears it's targeting jackson2.
| afterEvaluate { | ||
| if (project.hasProperty("sign")) { | ||
| signing { | ||
| sign publishing.publications |
Member
There was a problem hiding this comment.
Why did this get separated from the project.hasProperty("sign") step?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Build and publishing
Jackson 3 support
Validation
Ran:
./gradlew publishToMavenLocal
./gradlew :java-snapshot-testing-plugin-jackson3:test publishToMavenLocal
Notes
fixes #183