From 16df1b9ae8ef7575a3ce7f61ade83ffb492cd39c Mon Sep 17 00:00:00 2001 From: Sergey Shatunov Date: Thu, 5 Dec 2019 19:23:25 +0800 Subject: [PATCH] Migrate ktor-bom to java-platform plugin (#1337) --- build.gradle | 1 - gradle.properties | 3 --- ktor-bom/build.gradle | 12 +++++++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index fc676ee82..c4ebde202 100644 --- a/build.gradle +++ b/build.gradle @@ -48,7 +48,6 @@ buildscript { classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" classpath "me.champeau.gradle:jmh-gradle-plugin:$jmh_plugin_version" classpath "org.jetbrains.kotlinx:kotlinx.benchmark.gradle:$benchmarks_version" - classpath "io.spring.gradle:dependency-management-plugin:$spring_dependency_management_version" } } diff --git a/gradle.properties b/gradle.properties index e6821af36..e286692d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -43,9 +43,6 @@ slf4j_version=1.7.26 # typesafe config couldn't be upgraded due to android restrictions typesafe_config_version=1.3.1 -# publishing -spring_dependency_management_version=1.0.8.RELEASE - # third-party apache_version=4.1.4 gson_version=2.8.6 diff --git a/ktor-bom/build.gradle b/ktor-bom/build.gradle index 21a0c6e9d..9d25689a8 100644 --- a/ktor-bom/build.gradle +++ b/ktor-bom/build.gradle @@ -1,19 +1,19 @@ plugins { - id 'io.spring.dependency-management' + id 'java-platform' } apply from: rootProject.file('gradle/publish.gradle') def name = project.name -dependencyManagement { - dependencies { +dependencies { + constraints { rootProject.subprojects.each { if (it.plugins.hasPlugin("maven-publish") && it.name != name) { it.publishing.publications.all { if (it.artifactId.endsWith("-metadata")) return if (it.artifactId.endsWith("-kotlinMultiplatform")) return - dependency(group: it.groupId, name: it.artifactId, version: it.version) + api(group: it.groupId, name: it.artifactId, version: it.version) } } } @@ -22,6 +22,8 @@ dependencyManagement { publishing { publications { - maven(MavenPublication) + maven(MavenPublication) { + from components.javaPlatform + } } }