From 8f4404819f02252042a0f9679a87fa84dcabe64a Mon Sep 17 00:00:00 2001 From: Arthur Gavlyukovskiy Date: Sun, 19 Nov 2023 11:22:32 +0100 Subject: [PATCH] Added feature capability for nullability annotations to mark them as optional in POM --- build.gradle | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 0f396562..a5e379ec 100644 --- a/build.gradle +++ b/build.gradle @@ -27,8 +27,16 @@ ext { jUnitVersion = '5.10.1' } +java { + withJavadocJar() + withSourcesJar() + registerFeature('nullabilityAnnotations') { + usingSourceSet(sourceSets.main) + } +} + dependencies { - compileOnly 'com.google.code.findbugs:jsr305:3.0.2' + nullabilityAnnotationsImplementation 'com.google.code.findbugs:jsr305:3.0.2' testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.15.3' testImplementation "org.junit.jupiter:junit-jupiter-api:${jUnitVersion}" @@ -40,11 +48,6 @@ test { useJUnitPlatform() } -java { - withJavadocJar() - withSourcesJar() -} - publishing { publications { mavenJava(MavenPublication) {