@@ -88,11 +88,12 @@ android {
88
88
89
89
publishing {
90
90
singleVariant(" release" ) {
91
+ withSourcesJar()
92
+ withJavadocJar()
91
93
// withSourcesJar()
92
94
// withJavadocJar()
93
95
}
94
96
}
95
-
96
97
}
97
98
98
99
group = ' com.androidplot'
@@ -139,53 +140,53 @@ dependencies {
139
140
// options.overview = "src/main/java/overview.html"
140
141
// }
141
142
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
+ }
150
153
}
151
154
}
152
- }
153
155
154
- publications {
155
-
156
- publications. withType(MavenPublication ) {
156
+ publications {
157
+ release(MavenPublication ) {
157
158
// release(MavenPublication) {
158
159
//
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
+ }
175
177
}
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
182
189
}
183
- }
184
- scm {
185
- connection = gitUrl
186
- developerConnection = gitUrl
187
- url = gitUrl
188
-
189
190
}
190
191
}
191
192
}
0 commit comments