@@ -31,13 +31,14 @@ class AttrMarkdown extends DefaultTask {
31
31
def input = project. file(inFile)
32
32
33
33
def output = project. file(outFile)
34
- if (output. exists()) {
34
+ if (output. exists()) {
35
35
output. delete()
36
36
}
37
37
output. parentFile. mkdirs()
38
38
39
- input. text. findAll(/ <!--\n ?([\s\S ]*?)\n ?-->/ ) { match , g1 -> g1
40
- if (! g1. startsWith(" NODOC" )) {
39
+ input. text. findAll(/ <!--\n ?([\s\S ]*?)\n ?-->/ ) { match , g1 ->
40
+ g1
41
+ if (! g1. startsWith(" NODOC" )) {
41
42
output. append(g1)
42
43
output. append " \n\n "
43
44
}
@@ -53,7 +54,7 @@ class AttrMarkdown extends DefaultTask {
53
54
* The generated doc will appear in / replace androidplot/docs/attrs.md
54
55
*/
55
56
task generateAttrsMarkdown (type : AttrMarkdown ) {
56
- inFile = { " src/main/res/values/attrs.xml" }
57
+ inFile = { " src/main/res/values/attrs.xml" }
57
58
outFile = { " ../docs/attrs.md" }
58
59
}
59
60
@@ -85,6 +86,13 @@ android {
85
86
}
86
87
namespace ' com.androidplot'
87
88
89
+ publishing {
90
+ singleVariant(" release" ) {
91
+ // withSourcesJar()
92
+ // withJavadocJar()
93
+ }
94
+ }
95
+
88
96
}
89
97
90
98
group = ' com.androidplot'
@@ -121,65 +129,63 @@ dependencies {
121
129
// from javadoc.destinationDir
122
130
// }
123
131
124
- task sourcesJar (type : Jar ) {
125
- archiveClassifier. set(' sources' )
126
- from android. sourceSets. main. java. srcDirs
127
- }
132
+ // task sourcesJar(type: Jar) {
133
+ // archiveClassifier.set('sources')
134
+ // from android.sourceSets.main.java.srcDirs
135
+ // }
128
136
129
137
// TODO: get javadoc working again at some point
130
138
// javadoc {
131
139
// options.overview = "src/main/java/overview.html"
132
140
// }
133
141
134
- afterEvaluate {
135
- publishing {
136
- repositories {
137
- maven {
138
- name = " Maven Central"
139
- url = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
140
- credentials {
141
- username = System . getenv(" OSSRH_ACTOR" )
142
- password = System . getenv(" OSSRH_TOKEN" )
143
- }
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" )
144
150
}
145
151
}
152
+ }
146
153
147
- publications {
154
+ publications {
148
155
149
- publications. withType(MavenPublication ) {
156
+ publications. withType(MavenPublication ) {
150
157
// release(MavenPublication) {
151
158
//
152
159
// from components.release
153
160
154
- // You can then customize attributes of the publication as shown below.
155
- groupId = ' com.androidplot'
156
- artifactId = ' androidplot-core'
157
- version = theVersionName
158
-
159
- pom {
160
- packaging ' aar'
161
- name = ' Androidplot'
162
- description = " Configure any object from XML."
163
- url = gitUrl
164
- licenses {
165
- license {
166
- name = ' The Apache Software License, Version 2.0'
167
- url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
168
- }
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'
169
175
}
170
- developers {
171
- developer {
172
- id = ' halfhp '
173
- name = ' Nick Fellows '
174
-
175
- }
176
+ }
177
+ developers {
178
+ developer {
179
+ id = ' halfhp '
180
+ name = ' Nick Fellows '
181
+
176
182
}
177
- scm {
178
- connection = gitUrl
179
- developerConnection = gitUrl
180
- url = gitUrl
183
+ }
184
+ scm {
185
+ connection = gitUrl
186
+ developerConnection = gitUrl
187
+ url = gitUrl
181
188
182
- }
183
189
}
184
190
}
185
191
}
@@ -190,11 +196,11 @@ signing {
190
196
def signingKey = System . getenv(" SIGNING_KEY" )
191
197
def signingPassword = System . getenv(" SIGNING_PASSWORD" )
192
198
useInMemoryPgpKeys(signingKey, signingPassword)
193
- sign publishing. publications
199
+ sign( publishing. publications)
194
200
}
195
201
196
- artifacts {
197
- // TODO: get javadoc working again at some point
198
- // archives javadocJar
199
- archives sourcesJar
200
- }
202
+ // artifacts {
203
+ // // TODO: get javadoc working again at some point
204
+ // // archives javadocJar
205
+ // archives sourcesJar
206
+ // }
0 commit comments