Skip to content

Commit a9f065f

Browse files
committed
fix mavencentral publishing
1 parent 1e11eb2 commit a9f065f

File tree

1 file changed

+42
-41
lines changed

1 file changed

+42
-41
lines changed

androidplot-core/build.gradle

+42-41
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ android {
8888

8989
publishing {
9090
singleVariant("release") {
91+
withSourcesJar()
92+
withJavadocJar()
9193
//withSourcesJar()
9294
//withJavadocJar()
9395
}
9496
}
95-
9697
}
9798

9899
group = 'com.androidplot'
@@ -139,53 +140,53 @@ dependencies {
139140
// options.overview = "src/main/java/overview.html"
140141
//}
141142

142-
publishing {
143-
repositories {
144-
maven {
145-
name = "MavenCentral"
146-
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
147-
credentials {
148-
username = System.getenv("OSSRH_ACTOR")
149-
password = System.getenv("OSSRH_TOKEN")
143+
afterEvaluate {
144+
publishing {
145+
repositories {
146+
maven {
147+
name = "MavenCentral"
148+
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
149+
credentials {
150+
username = System.getenv("OSSRH_ACTOR")
151+
password = System.getenv("OSSRH_TOKEN")
152+
}
150153
}
151154
}
152-
}
153155

154-
publications {
155-
156-
publications.withType(MavenPublication) {
156+
publications {
157+
release(MavenPublication) {
157158
// release(MavenPublication) {
158159
//
159-
// from components.release
160-
161-
// You can then customize attributes of the publication as shown below.
162-
groupId = 'com.androidplot'
163-
artifactId = 'androidplot-core'
164-
version = theVersionName
165-
166-
pom {
167-
packaging 'aar'
168-
name = 'Androidplot'
169-
description = "Configure any object from XML."
170-
url = gitUrl
171-
licenses {
172-
license {
173-
name = 'The Apache Software License, Version 2.0'
174-
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
160+
from components.release
161+
162+
// You can then customize attributes of the publication as shown below.
163+
groupId = 'com.androidplot'
164+
artifactId = 'androidplot-core'
165+
version = theVersionName
166+
167+
pom {
168+
packaging 'aar'
169+
name = 'Androidplot'
170+
description = "Configure any object from XML."
171+
url = gitUrl
172+
licenses {
173+
license {
174+
name = 'The Apache Software License, Version 2.0'
175+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
176+
}
175177
}
176-
}
177-
developers {
178-
developer {
179-
id = 'halfhp'
180-
name = 'Nick Fellows'
181-
178+
developers {
179+
developer {
180+
id = 'halfhp'
181+
name = 'Nick Fellows'
182+
183+
}
184+
}
185+
scm {
186+
connection = gitUrl
187+
developerConnection = gitUrl
188+
url = gitUrl
182189
}
183-
}
184-
scm {
185-
connection = gitUrl
186-
developerConnection = gitUrl
187-
url = gitUrl
188-
189190
}
190191
}
191192
}

0 commit comments

Comments
 (0)