Skip to content

Commit bb10d67

Browse files
committed
Fix for Sonatype publishing
1 parent b0d0e14 commit bb10d67

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

library/build.gradle

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,43 @@ afterEvaluate {
6464
groupId = GROUP
6565
artifactId = POM_ARTIFACT_ID
6666
version = VERSION_NAME
67+
68+
pom {
69+
name = POM_NAME
70+
url = POM_URL
71+
description = POM_DESCRIPTION
72+
licenses {
73+
license {
74+
name = POM_LICENCE_NAME
75+
url = POM_LICENCE_URL
76+
}
77+
}
78+
developers {
79+
developer {
80+
id = POM_DEVELOPER_ID
81+
name = POM_DEVELOPER_NAME
82+
}
83+
}
84+
scm {
85+
url = POM_SCM_URL
86+
}
87+
}
88+
}
89+
}
90+
repositories {
91+
maven {
92+
name = "Sonatype"
93+
credentials {
94+
username = System.getenv('NEXUS_USERNAME')
95+
password = System.getenv('NEXUS_PASSWORD')
96+
}
97+
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
98+
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
99+
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
100+
setUrl(url)
67101
}
68102
}
69-
repositories {
70-
maven {
71-
name = "Sonatype"
72-
credentials {
73-
username = System.getenv('NEXUS_USERNAME')
74-
password = System.getenv('NEXUS_PASSWORD')
75-
}
76-
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
77-
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
78-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
79-
setUrl(url)
80-
}
81103
}
82-
}
83104
}
84105

85106
signing {
@@ -102,7 +123,7 @@ artifacts {
102123
}
103124

104125
ext {
105-
supportVersion = '28.0.0'
126+
supportVersion = '28.0.0'
106127
}
107128

108129
dependencies {

0 commit comments

Comments
 (0)