From a086a87294c36fb24b9ecf3e41de27f4288573a4 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 10 Sep 2024 16:43:24 +1200 Subject: [PATCH] Apply plugin elsewhere --- plugin/build.gradle.kts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index fd1e3570036..0bd748f6b1b 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -24,15 +24,12 @@ tasks.withType().configureEach { javadocTool.set( javaToolchains.javadocToolFor { + setDestinationDir(file("../build/docs/javadoc")) languageVersion = JavaLanguageVersion.of(21) } ) } -tasks.named("publish") { - apply(plugin = "org.hibernate.build.maven-repo-auth") -} - publishing { repositories { // If 'publishToExternalRepo' is false or missing, only publish to local. @@ -40,15 +37,19 @@ publishing { // Otherwise, use the release repo if (System.getProperty("publishToExternalRepo", "false").equals("false")) { mavenLocal(); - } else if (project.version.toString().contains("-SNAPSHOT")) { - maven { - name = "md_5-snapshots" - url = uri("https://repo.md-5.net/content/repositories/snapshots/") - } } else { - maven { - name = "md_5-releases" - url = uri("https://repo.md-5.net/content/repositories/releases/") + apply(plugin = "org.hibernate.build.maven-repo-auth") + + if (project.version.toString().contains("-SNAPSHOT")) { + maven { + name = "md_5-snapshots" + url = uri("https://repo.md-5.net/content/repositories/snapshots/") + } + } else { + maven { + name = "md_5-releases" + url = uri("https://repo.md-5.net/content/repositories/releases/") + } } } }