diff --git a/build.gradle b/build.gradle index 2540c45..2b55f7b 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,23 @@ buildscript { } } +plugins { + alias(libs.plugins.nmcp.aggregation) +} + +if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) { + nmcpAggregation { + centralPortal { + username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER') + password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD') + validationTimeout = Duration.ofHours(4) + publishingType = System.getenv('PUBLISHING_TYPE') != "" ? System.getenv('PUBLISHING_TYPE') : "USER_MANAGED" + } + + publishAllProjectsProbablyBreakingProjectIsolation() + } +} + allprojects { repositories { mavenLocal() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7229d8d..5519f34 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,6 +10,8 @@ kslog = "1.3.6" krontab = "2.6.1" plagubot-plugins = "0.24.0" +nmcp="0.2.1" + dokka = "1.9.20" psql = "42.6.0" @@ -47,3 +49,5 @@ kotlin-dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", vers kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } + +nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" }