1
1
apply plugin : ' java'
2
2
apply plugin : ' idea'
3
- apply plugin : ' maven'
3
+ apply plugin : ' maven-publish '
4
4
apply plugin : ' eclipse'
5
5
apply plugin : ' jacoco'
6
6
apply plugin : ' checkstyle'
7
7
apply plugin : ' signing'
8
8
9
9
import org.apache.tools.ant.filters.*
10
10
11
- group ' io.appium'
12
- version ' 7.0.0'
13
-
14
11
repositories {
15
12
jcenter()
16
13
mavenCentral()
@@ -115,83 +112,89 @@ checkstyle {
115
112
}
116
113
checkstyleMain. excludes = [' **/org/openqa/selenium/**' ]
117
114
118
- task javadocJar (type : Jar ) {
119
- classifier = ' javadoc'
120
- from javadoc
121
- }
122
-
123
115
task sourcesJar (type : Jar ) {
124
- classifier = ' sources'
125
- from sourceSets. main. allSource
126
- }
127
-
128
- artifacts {
129
- archives javadocJar, sourcesJar
116
+ from sourceSets. main. allJava
117
+ archiveClassifier = ' sources'
130
118
}
131
119
132
- signing {
133
- sign configurations . archives
134
- }
135
-
136
- uploadArchives {
137
- repositories {
138
- mavenDeployer {
139
- beforeDeployment { MavenDeployment deployment -> signing . signPom(deployment) }
140
-
141
- repository( url : ' https://oss.sonatype.org/service/local/staging/deploy/maven2/ ' ) {
142
- authentication( userName : ossrhUsername, password : ossrhPassword)
143
- }
144
-
145
- snapshotRepository( url : ' https://oss.sonatype.org/content/repositories/snapshots/ ' ) {
146
- authentication( userName : ossrhUsername, password : ossrhPassword)
147
- }
148
-
149
- pom . project {
150
- packaging ' jar '
151
- name ' java-client'
152
- description ' Java client for Appium Mobile Webdriver'
153
- url ' http://appium.io'
120
+ task javadocJar ( type : Jar ) {
121
+ from javadoc
122
+ archiveClassifier = ' javadoc '
123
+ }
124
+
125
+ javadoc {
126
+ options . addStringOption( ' encoding ' , ' UTF-8 ' )
127
+ }
128
+
129
+ publishing {
130
+ publications {
131
+ mavenJava( MavenPublication ) {
132
+ groupId = ' io.appium '
133
+ artifactId = ' java-client '
134
+ version = ' 7.1.0 '
135
+ from components . java
136
+ artifact sourcesJar
137
+ artifact javadocJar
138
+ pom {
139
+ name = ' java-client'
140
+ description = ' Java client for Appium Mobile Webdriver'
141
+ url = ' http://appium.io'
154
142
developers {
155
143
developer {
156
- name ' Jonah Stiennon'
157
-
158
- url ' https://github.com/jonahss'
159
- id ' jonahss'
160
- };
144
+ name = ' Jonah Stiennon'
145
+
146
+ url = ' https://github.com/jonahss'
147
+ id = ' jonahss'
148
+ }
161
149
developer {
162
- name ' Sergey Tikhomirov'
163
-
164
- url ' https://github.com/TikhomirovSergey'
165
- id ' TikhomirovSergey'
166
- };
150
+ name = ' Sergey Tikhomirov'
151
+
152
+ url = ' https://github.com/TikhomirovSergey'
153
+ id = ' TikhomirovSergey'
154
+ }
167
155
developer {
168
- name ' Srinivasan Sekar'
169
-
170
- url ' https://github.com/SrinivasanTarget'
171
- id ' SrinivasanTarget'
172
- };
156
+ name = ' Srinivasan Sekar'
157
+
158
+ url = ' https://github.com/SrinivasanTarget'
159
+ id = ' SrinivasanTarget'
160
+ }
173
161
developer {
174
- name ' Mykola Mokhnach'
175
- url ' https://github.com/mykola-mokhnach'
176
- id ' mykola-mokhnach'
177
- };
162
+ name = ' Mykola Mokhnach'
163
+ url = ' https://github.com/mykola-mokhnach'
164
+ id = ' mykola-mokhnach'
165
+ }
178
166
}
179
167
licenses {
180
168
license {
181
- name ' Apache License, Version 2.0'
182
- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
183
- distribution ' repo'
169
+ name = ' Apache License, Version 2.0'
170
+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
171
+ distribution = ' repo'
184
172
}
185
173
}
186
174
scm {
187
- url ' https://github.com/appium/java-client'
188
- connection
' scm:git:ssh://[email protected] /appium/java-client.git'
189
- developerConnection
' scm:git:ssh://[email protected] /appium/java-client.git'
190
- tag ' HEAD'
175
+ url = ' https://github.com/appium/java-client'
176
+ connection
= ' scm:git:ssh://[email protected] /appium/java-client.git'
177
+ developerConnection
= ' scm:git:ssh://[email protected] /appium/java-client.git'
178
+ tag = ' HEAD'
191
179
}
192
180
}
193
181
}
194
182
}
183
+ repositories {
184
+ maven {
185
+ credentials {
186
+ username " $ossrhUsername "
187
+ password " $ossrhPassword "
188
+ }
189
+ def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
190
+ def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots/'"
191
+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
192
+ }
193
+ }
194
+ }
195
+
196
+ signing {
197
+ sign publishing. publications. mavenJava
195
198
}
196
199
197
200
wrapper {
@@ -233,4 +236,4 @@ task uiAutomationTest( type: Test ) {
233
236
includeTestsMatching ' io.appium.java_client.android.ClipboardTest'
234
237
includeTestsMatching ' *.AndroidAppStringsTest'
235
238
}
236
- }
239
+ }
0 commit comments