File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ object Plugins {
3737
3838 // Publishing
3939 const val nexusStaging: Lib = " io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0"
40+ const val nexusPublishing: Lib = " de.marcphilipp.gradle:nexus-publish-plugin:0.4.0"
4041}
4142
4243/* *
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ final Deployed deployConfig = project.ext.deployConfig
1010final DeployedCredentials deployCredentials = project. ext. deployCredentials
1111final boolean isAndroid = project. plugins. findPlugin(" com.android.library" ) != null
1212
13- apply plugin : " maven -publish"
13+ apply plugin : " de.marcphilipp.nexus -publish"
1414apply plugin : " signing"
1515apply plugin : " org.jetbrains.dokka"
1616
@@ -126,9 +126,20 @@ nexusStaging {
126126 password = deployCredentials. ossrhPassword
127127}
128128
129+ nexusPublishing {
130+ repositories {
131+ sonatype {
132+ username = deployCredentials. ossrhUsername
133+ password = deployCredentials. ossrhPassword
134+ }
135+ }
136+ }
137+
129138// Catch-all deployment task for multiple modules
130- def deploy = tasks. maybeCreate(" deploy" )
131- deploy. finalizedBy " publishReleasePublicationToCentralRepository"
139+ def deployTask = tasks. maybeCreate(" deploy" )
140+ def publishTask = tasks. getByName(" publishToSonatype" )
141+
142+ deployTask. finalizedBy(publishTask)
132143if (! isSnapshot) {
133- deploy . finalizedBy " closeAndReleaseRepository"
144+ publishTask . finalizedBy( " : closeAndReleaseRepository" )
134145}
Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ buildscript {
66 mavenCentral()
77 jcenter()
88 jitpack()
9+ gradlePluginPortal()
910 }
1011 dependencies {
1112 classpath(Plugins .kotlin)
1213 classpath(Plugins .android.dependency)
1314 classpath(Plugins .versions)
1415 classpath(Plugins .dokkaCore)
1516 classpath(Plugins .nexusStaging)
17+ classpath(Plugins .nexusPublishing)
1618 }
1719}
1820
Original file line number Diff line number Diff line change @@ -6,12 +6,14 @@ buildscript {
66 mavenCentral()
77 jcenter()
88 jitpack()
9+ gradlePluginPortal()
910 }
1011 dependencies {
1112 classpath(Plugins .kotlin)
1213 classpath(Plugins .versions)
1314 classpath(Plugins .dokkaCore)
1415 classpath(Plugins .nexusStaging)
16+ classpath(Plugins .nexusPublishing)
1517 classpath(Plugins .shadow)
1618 }
1719}
You can’t perform that action at this time.
0 commit comments