Apply plugin elsewhere

This commit is contained in:
libraryaddict 2024-09-10 16:43:24 +12:00
parent 7fcd65514a
commit a086a87294

View File

@ -24,15 +24,12 @@ tasks.withType<Javadoc>().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/")
}
}
}
}