diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 7675dc5..444e72f 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -14,6 +14,7 @@ java { dependencies { implementation(rmr.infrastructure.publish) implementation(rmr.infrastructure.android) + implementation(libs.publish.gradlePlugin) implementation(stack.gradle.android.cacheFixGradlePlugin) implementation(stack.kotlin.gradlePlugin) implementation(stack.detekt.gradlePlugin) diff --git a/buildSrc/src/main/kotlin/convention.publishing.gradle.kts b/buildSrc/src/main/kotlin/convention.publishing.gradle.kts index 5c0bcd6..a3d37a7 100644 --- a/buildSrc/src/main/kotlin/convention.publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/convention.publishing.gradle.kts @@ -1,31 +1,33 @@ import com.redmadrobot.build.dsl.* +import com.vanniktech.maven.publish.SonatypeHost plugins { - id("com.redmadrobot.publish-config") - id("com.redmadrobot.publish") + id("com.vanniktech.maven.publish") } -redmadrobot { - publishing { - signArtifacts = !isRunningOnCi - pom { - setGitHubProject("RedMadRobot/gears-android") +mavenPublishing { + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true) + signAllPublications() - licenses { - mit() - } + pom { + name.convention(project.name) + description.convention(project.description) - developers { - developer(id = "osipxd", name = "Osip Fatkullin", email = "o.fatkullin@redmadrobot.com") - developer(id = "sonulen", name = "Andrey Tolmachev", email = "a.tolmachev@redmadrobot.com") - } + licenses { + mit() } + + developers { + developer(id = "osipxd", name = "Osip Fatkullin", email = "o.fatkullin@redmadrobot.com") + developer(id = "sonulen", name = "Andrey Tolmachev", email = "a.tolmachev@redmadrobot.com") + } + + setGitHubProject("RedMadRobot/gears-android") } } publishing { repositories { if (isRunningOnCi) githubPackages("RedMadRobot/gears-android") - if (isReleaseVersion && credentialsExist("ossrh")) ossrh() } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b23be7a..1302371 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,13 @@ [versions] -androidGradlePlugin = "8.4.0" +androidGradlePlugin = "8.4.1" assertj-core = "3.25.1" androidx-arch-core = "2.2.0" -viewbinding = "8.4.0" +viewbinding = "8.4.1" +publish-plugin = "0.28.0" [libraries] androidx-viewbinding = { module = "androidx.databinding:viewbinding", version.ref = "viewbinding" } assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj-core" } androidx-arch-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "androidx-arch-core"} android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } +publish-gradlePlugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "publish-plugin" }