From 01276bbe49792c22cfe2d0b1dc838cf525865a11 Mon Sep 17 00:00:00 2001 From: "Alexander.Likhachev" Date: Wed, 7 Jun 2023 17:58:38 +0200 Subject: [PATCH] [Build] Fix buildscripts deprecation warnings #KTI-1221 In Progress --- .../gradle-plugin-common-configuration.gradle.kts | 10 ++++++---- kotlin-native/backend.native/tests/build.gradle | 2 +- libraries/commonConfiguration.gradle | 2 +- plugins/pill/pill-importer/build.gradle.kts | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/kotlin/gradle-plugin-common-configuration.gradle.kts b/buildSrc/src/main/kotlin/gradle-plugin-common-configuration.gradle.kts index 830edec15ae..0437d06d190 100644 --- a/buildSrc/src/main/kotlin/gradle-plugin-common-configuration.gradle.kts +++ b/buildSrc/src/main/kotlin/gradle-plugin-common-configuration.gradle.kts @@ -22,10 +22,12 @@ addBomCheckTask() extensions.extraProperties["kotlin.stdlib.default.dependency"] = "false" // common plugin bundle configuration -configure { - website = "https://kotlinlang.org/" - vcsUrl = "https://github.com/jetbrains/kotlin" - tags = listOf("kotlin") +gradlePlugin { + website.set("https://kotlinlang.org/") + vcsUrl.set("https://github.com/jetbrains/kotlin") + plugins.configureEach { + tags.add("kotlin") + } } publishing { diff --git a/kotlin-native/backend.native/tests/build.gradle b/kotlin-native/backend.native/tests/build.gradle index 1a79f7d679e..fc1ca574795 100644 --- a/kotlin-native/backend.native/tests/build.gradle +++ b/kotlin-native/backend.native/tests/build.gradle @@ -5816,7 +5816,7 @@ Task pluginTest(String name, String pluginName, Closure configureClosure) { from { sourceSets[pluginName].output } - baseName = pluginName + archiveBaseName = pluginName destinationDirectory = buildDir } def taskName = "$name-with-$pluginName" diff --git a/libraries/commonConfiguration.gradle b/libraries/commonConfiguration.gradle index c35a65f99ef..a8f0717df00 100644 --- a/libraries/commonConfiguration.gradle +++ b/libraries/commonConfiguration.gradle @@ -38,7 +38,7 @@ task preparePublication { project.ext.isDeployStagingRepoGenerationRequired = project.ext.isSonatypeRelease && deployUrlFromParameters == null - ext.repoUrl = deployUrlFromParameters ?: "file://${rootProject.buildDir}/repo".toString() + ext.repoUrl = (deployUrlFromParameters ?: "file://${rootProject.buildDir}/repo").toString() logger.info("Deployment repository preliminary url: ${ext.repoUrl} ($repoProvider)") ext.username = properties["deployRepoUsername"] ?: properties["kotlin.${repoProvider}.user"] diff --git a/plugins/pill/pill-importer/build.gradle.kts b/plugins/pill/pill-importer/build.gradle.kts index 09a4589b880..245eb4d6a8f 100644 --- a/plugins/pill/pill-importer/build.gradle.kts +++ b/plugins/pill/pill-importer/build.gradle.kts @@ -25,7 +25,7 @@ sourceSets { } fun runPillTask(taskName: String) { - val jarFile = configurations.archives.artifacts.single { it.type == "jar" }.file + val jarFile = configurations.archives.get().artifacts.single { it.type == "jar" }.file val cl = URLClassLoader(arrayOf(jarFile.toURI().toURL()), (object {}).javaClass.classLoader) val pillImporterClass = Class.forName("org.jetbrains.kotlin.pill.PillImporter", true, cl)