diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ebd12f..e8409610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,10 @@ ## 0.28.0 **UNRELEASED** -- Removed support for the deprecated Kotlin/JS plugin. - Updated minimum supported Gradle, Android Gradle Plugin and Kotlin versions. +- Removed support for the deprecated Kotlin/JS plugin. +- Removed the deprecated `closeAndReleaseRepository` task. Use `releaseRepository`, which + is functionally equivalent, instead. #### Minimum supported versions - JDK 11 diff --git a/plugin/src/main/kotlin/com/vanniktech/maven/publish/MavenPublishBaseExtension.kt b/plugin/src/main/kotlin/com/vanniktech/maven/publish/MavenPublishBaseExtension.kt index 56fdd1dd..a1dfd336 100644 --- a/plugin/src/main/kotlin/com/vanniktech/maven/publish/MavenPublishBaseExtension.kt +++ b/plugin/src/main/kotlin/com/vanniktech/maven/publish/MavenPublishBaseExtension.kt @@ -1,9 +1,8 @@ package com.vanniktech.maven.publish -import com.vanniktech.maven.publish.sonatype.CloseAndReleaseSonatypeRepositoryTask.Companion.registerCloseAndReleaseRepository -import com.vanniktech.maven.publish.sonatype.CloseAndReleaseSonatypeRepositoryTask.Companion.registerReleaseRepository import com.vanniktech.maven.publish.sonatype.CreateSonatypeRepositoryTask.Companion.registerCreateRepository import com.vanniktech.maven.publish.sonatype.DropSonatypeRepositoryTask.Companion.registerDropRepository +import com.vanniktech.maven.publish.sonatype.ReleaseSonatypeRepositoryTask.Companion.registerReleaseRepository import com.vanniktech.maven.publish.sonatype.SonatypeRepositoryBuildService.Companion.registerSonatypeRepositoryBuildService import com.vanniktech.maven.publish.tasks.WorkaroundSignatureType import org.gradle.api.Action @@ -82,7 +81,6 @@ abstract class MavenPublishBaseExtension( } val releaseRepository = project.tasks.registerReleaseRepository(buildService, createRepository) - project.tasks.registerCloseAndReleaseRepository(buildService, createRepository) project.tasks.registerDropRepository(buildService, createRepository) project.tasks.register("publishToMavenCentral") { diff --git a/plugin/src/main/kotlin/com/vanniktech/maven/publish/sonatype/CloseAndReleaseSonatypeRepositoryTask.kt b/plugin/src/main/kotlin/com/vanniktech/maven/publish/sonatype/ReleaseSonatypeRepositoryTask.kt similarity index 56% rename from plugin/src/main/kotlin/com/vanniktech/maven/publish/sonatype/CloseAndReleaseSonatypeRepositoryTask.kt rename to plugin/src/main/kotlin/com/vanniktech/maven/publish/sonatype/ReleaseSonatypeRepositoryTask.kt index 78151217..1646c2c2 100644 --- a/plugin/src/main/kotlin/com/vanniktech/maven/publish/sonatype/CloseAndReleaseSonatypeRepositoryTask.kt +++ b/plugin/src/main/kotlin/com/vanniktech/maven/publish/sonatype/ReleaseSonatypeRepositoryTask.kt @@ -11,7 +11,7 @@ import org.gradle.api.tasks.TaskContainer import org.gradle.api.tasks.TaskProvider import org.gradle.api.tasks.options.Option -internal abstract class CloseAndReleaseSonatypeRepositoryTask : DefaultTask() { +internal abstract class ReleaseSonatypeRepositoryTask : DefaultTask() { @get:Internal abstract val buildService: Property @@ -28,13 +28,12 @@ internal abstract class CloseAndReleaseSonatypeRepositoryTask : DefaultTask() { companion object { private const val NAME = "releaseRepository" - private const val LEGACY_NAME = "closeAndReleaseRepository" fun TaskContainer.registerReleaseRepository( buildService: Provider, createRepository: TaskProvider, - ): TaskProvider { - return register(NAME, CloseAndReleaseSonatypeRepositoryTask::class.java) { + ): TaskProvider { + return register(NAME, ReleaseSonatypeRepositoryTask::class.java) { it.description = "Releases a staging repository on Sonatype OSS" it.group = "release" it.buildService.set(buildService) @@ -42,21 +41,5 @@ internal abstract class CloseAndReleaseSonatypeRepositoryTask : DefaultTask() { it.mustRunAfter(createRepository) } } - - fun TaskContainer.registerCloseAndReleaseRepository( - buildService: Provider, - createRepository: TaskProvider, - ): TaskProvider { - return register(LEGACY_NAME, CloseAndReleaseSonatypeRepositoryTask::class.java) { - it.description = "Closes and releases a staging repository on Sonatype OSS" - it.group = "release" - it.buildService.set(buildService) - it.usesService(buildService) - it.mustRunAfter(createRepository) - it.doLast { task -> - task.logger.warn("$LEGACY_NAME is deprecated and will be removed in a future release, use $NAME instead.") - } - } - } } }