Skip to content

Commit

Permalink
Apply plugin elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
libraryaddict committed Sep 10, 2024
1 parent 7fcd655 commit a086a87
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,32 @@ 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.
// Else if this is a snapshot build, use the snapshot repo
// 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/")
}
}
}
}
Expand Down

0 comments on commit a086a87

Please sign in to comment.