Skip to content

Commit

Permalink
Upgrade Publishing Plugin
Browse files Browse the repository at this point in the history
Upgrade the Maven Publishing plugin to the latest stable version.
  • Loading branch information
vRallev committed Nov 22, 2024
1 parent 836d9d0 commit a9852fd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
package software.amazon.lastmile.kotlin.inject.anvil.gradle

import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
import org.gradle.api.Plugin
import org.gradle.api.Project

internal class PublishingPlugin : Plugin<Project> {
override fun apply(target: Project) {
target.plugins.apply(target.libs.findPlugin("maven-publish").get().get().pluginId)
target.configurePublishing()
}

private fun Project.configurePublishing() {
val extension = extensions.getByType(MavenPublishBaseExtension::class.java)
extension.publishToMavenCentral(SonatypeHost("https://aws.oss.sonatype.org"))
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ksp.useKSP2=false

# This property does not work when setting up publishing through the DSL as we do.
# SONATYPE_AUTOMATIC_RELEASE=true
SONATYPE_HOST=https://aws.oss.sonatype.org
RELEASE_SIGNING_ENABLED=true

POM_DESCRIPTION=Extensions for kotlin-inject to make dependency injection easier with a similar feature set as Anvil.
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kotlinx-binaryCompatibilityValidator = "0.16.3"
ksp = "2.0.21-1.0.28"
ktlint-binary = "1.2.1"
ktlint-gradle = "12.1.1"
maven-publish = "0.29.0"
maven-publish = "0.30.0"

[libraries]
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "agp" }
Expand Down

0 comments on commit a9852fd

Please sign in to comment.