From 7457b1b9acfdadf03df12bbfa4b545528f9b40f0 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 25 Jul 2024 18:04:00 +0200 Subject: [PATCH] [libgdx] Add javadoc Jar to publishing artifacts. --- spine-libgdx/build.gradle | 5 +++++ spine-libgdx/publishing.gradle | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/spine-libgdx/build.gradle b/spine-libgdx/build.gradle index c920b27c25..9312019afd 100644 --- a/spine-libgdx/build.gradle +++ b/spine-libgdx/build.gradle @@ -16,6 +16,11 @@ allprojects { maven { url "https://oss.sonatype.org/content/repositories/snapshots" } mavenCentral() } + + tasks.withType(JavaCompile) { + sourceCompatibility = javaVersion.toString() + targetCompatibility = javaVersion.toString() + } } project("spine-libgdx") { diff --git a/spine-libgdx/publishing.gradle b/spine-libgdx/publishing.gradle index c732199d13..be615e6fb7 100644 --- a/spine-libgdx/publishing.gradle +++ b/spine-libgdx/publishing.gradle @@ -14,12 +14,23 @@ project("spine-libgdx") { from(sourceSets.main.allJava) } + tasks.javadoc { + failOnError = false + } + + tasks.register("javadocJar", Jar) { + dependsOn javadoc + archiveClassifier.set("javadoc") + from(javadoc.destinationDir) + } + afterEvaluate { publishing { publications { create("release", MavenPublication) { from(components.java) artifact(tasks.getByName("sourceJar")) + artifact(tasks.getByName("javadocJar")) groupId = "com.esotericsoftware.spine" artifactId = "spine-libgdx"