diff --git a/buildSrc/src/main/kotlin/murphy.kotlin-library.gradle.kts b/buildSrc/src/main/kotlin/murphy.kotlin-library.gradle.kts index 578ffb1..d22daaf 100644 --- a/buildSrc/src/main/kotlin/murphy.kotlin-library.gradle.kts +++ b/buildSrc/src/main/kotlin/murphy.kotlin-library.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("jvm") - `maven-publish` + id("murphy.publishing") } group = rootProject.group @@ -34,38 +34,6 @@ publishing { publications { create("maven") { from(components["java"]) - - pom { - name.set(project.name) - description.set("Lightweight chaos engineering library for JVM to simulate network failures and latency in HTTP clients - ${project.name}") - url.set("https://github.com/kronst/murphy") - - licenses { - license { - name.set("MIT License") - url.set("https://opensource.org/licenses/MIT") - } - } - - developers { - developer { - id.set("kronst") - name.set("Roman Konstantynovskyi") - } - } - - scm { - connection.set("scm:git:git://github.com/kronst/murphy.git") - developerConnection.set("scm:git:ssh://github.com/kronst/murphy.git") - url.set("https://github.com/kronst/murphy") - } - } - } - } - - repositories { - maven { - url = uri(rootProject.layout.buildDirectory.dir("staging-deploy")) } } } diff --git a/buildSrc/src/main/kotlin/murphy.publishing.gradle.kts b/buildSrc/src/main/kotlin/murphy.publishing.gradle.kts new file mode 100644 index 0000000..53071a3 --- /dev/null +++ b/buildSrc/src/main/kotlin/murphy.publishing.gradle.kts @@ -0,0 +1,39 @@ +plugins { + `maven-publish` +} + +publishing { + publications.withType().configureEach { + pom { + name.set(project.name) + description.set("Lightweight chaos engineering library for JVM to simulate network failures and latency in HTTP clients - ${project.name}") + url.set("https://github.com/kronst/murphy") + + licenses { + license { + name.set("MIT License") + url.set("https://opensource.org/licenses/MIT") + } + } + + developers { + developer { + id.set("kronst") + name.set("Roman Konstantynovskyi") + } + } + + scm { + connection.set("scm:git:git://github.com/kronst/murphy.git") + developerConnection.set("scm:git:ssh://github.com/kronst/murphy.git") + url.set("https://github.com/kronst/murphy") + } + } + } + + repositories { + maven { + url = uri(rootProject.layout.buildDirectory.dir("staging-deploy")) + } + } +} diff --git a/murphy-bom/build.gradle.kts b/murphy-bom/build.gradle.kts new file mode 100644 index 0000000..d0c0d3c --- /dev/null +++ b/murphy-bom/build.gradle.kts @@ -0,0 +1,28 @@ +plugins { + `java-platform` + id("murphy.publishing") +} + +group = rootProject.group + +javaPlatform { + allowDependencies() +} + +dependencies { + constraints { + api(project(":murphy-core")) + api(project(":murphy-http")) + api(project(":murphy-ktor")) + api(project(":murphy-okhttp")) + api(project(":murphy-spring")) + } +} + +publishing { + publications { + create("maven") { + from(components["javaPlatform"]) + } + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 8496ca1..a404709 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -4,6 +4,7 @@ plugins { rootProject.name = "murphy" +include("murphy-bom") include("murphy-core") include("murphy-http") include("murphy-ktor")