From d87fcc0c98c81c56e7bcb3947b40b434b380f0f3 Mon Sep 17 00:00:00 2001 From: virustotalop Date: Fri, 24 Nov 2023 05:04:56 -0800 Subject: [PATCH] Attempt to fix maven publishing There are some issues with getting javadoc jars with jitpack this should fix it. --- api/build.gradle | 2 +- build.gradle | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/api/build.gradle b/api/build.gradle index c01246366..a571b2a53 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'java' + id 'java-library' } dependencies { diff --git a/build.gradle b/build.gradle index da7b4b303..74af0936c 100644 --- a/build.gradle +++ b/build.gradle @@ -28,24 +28,33 @@ subprojects { apply plugin: 'org.cadixdev.licenser' apply plugin: 'maven-publish' + java { + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } + withJavadocJar() + withSourcesJar() + } + + javadoc { + if(JavaVersion.current().isJava9Compatible()) { + options.addBooleanOption('html5', true) + } + } + publishing { publications { - shadow(MavenPublication) { + mavenJava(MavenPublication) { groupId projectGroup artifactId project.name version projectVersion - artifact shadowJar + artifact jar + artifact javadocJar + artifact sourcesJar } } } - java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } - withJavadocJar() - } - license { header = project.rootProject.file('HEADER.txt') include '**/*.java'