-
-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply Maven publish plugin and Release 7.1.0
- Loading branch information
1 parent
bbfe070
commit 121aa41
Showing
1 changed file
with
67 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'idea' | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'jacoco' | ||
apply plugin: 'checkstyle' | ||
apply plugin: 'signing' | ||
|
||
import org.apache.tools.ant.filters.* | ||
|
||
group 'io.appium' | ||
version '7.0.0' | ||
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
|
@@ -115,83 +112,89 @@ checkstyle { | |
} | ||
checkstyleMain.excludes = ['**/org/openqa/selenium/**'] | ||
|
||
task javadocJar(type: Jar) { | ||
classifier = 'javadoc' | ||
from javadoc | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar | ||
from sourceSets.main.allJava | ||
archiveClassifier = 'sources' | ||
} | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.project { | ||
packaging 'jar' | ||
name 'java-client' | ||
description 'Java client for Appium Mobile Webdriver' | ||
url 'http://appium.io' | ||
task javadocJar(type: Jar) { | ||
from javadoc | ||
archiveClassifier = 'javadoc' | ||
} | ||
|
||
javadoc { | ||
options.addStringOption('encoding', 'UTF-8') | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
groupId = 'io.appium' | ||
artifactId = 'java-client' | ||
version = '7.1.0' | ||
from components.java | ||
artifact sourcesJar | ||
artifact javadocJar | ||
pom { | ||
name = 'java-client' | ||
description = 'Java client for Appium Mobile Webdriver' | ||
url = 'http://appium.io' | ||
developers { | ||
developer { | ||
name 'Jonah Stiennon' | ||
email '[email protected]' | ||
url 'https://github.com/jonahss' | ||
id 'jonahss' | ||
}; | ||
name = 'Jonah Stiennon' | ||
email = '[email protected]' | ||
url = 'https://github.com/jonahss' | ||
id = 'jonahss' | ||
} | ||
developer { | ||
name 'Sergey Tikhomirov' | ||
email '[email protected]' | ||
url 'https://github.com/TikhomirovSergey' | ||
id 'TikhomirovSergey' | ||
}; | ||
name = 'Sergey Tikhomirov' | ||
email = '[email protected]' | ||
url = 'https://github.com/TikhomirovSergey' | ||
id = 'TikhomirovSergey' | ||
} | ||
developer { | ||
name 'Srinivasan Sekar' | ||
email '[email protected]' | ||
url 'https://github.com/SrinivasanTarget' | ||
id 'SrinivasanTarget' | ||
}; | ||
name = 'Srinivasan Sekar' | ||
email = '[email protected]' | ||
url = 'https://github.com/SrinivasanTarget' | ||
id = 'SrinivasanTarget' | ||
} | ||
developer { | ||
name 'Mykola Mokhnach' | ||
url 'https://github.com/mykola-mokhnach' | ||
id 'mykola-mokhnach' | ||
}; | ||
name = 'Mykola Mokhnach' | ||
url = 'https://github.com/mykola-mokhnach' | ||
id = 'mykola-mokhnach' | ||
} | ||
} | ||
licenses { | ||
license { | ||
name 'Apache License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
name = 'Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution = 'repo' | ||
} | ||
} | ||
scm { | ||
url 'https://github.com/appium/java-client' | ||
connection 'scm:git:ssh://[email protected]/appium/java-client.git' | ||
developerConnection 'scm:git:ssh://[email protected]/appium/java-client.git' | ||
tag 'HEAD' | ||
url = 'https://github.com/appium/java-client' | ||
connection = 'scm:git:ssh://[email protected]/appium/java-client.git' | ||
developerConnection = 'scm:git:ssh://[email protected]/appium/java-client.git' | ||
tag = 'HEAD' | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
credentials { | ||
username "$ossrhUsername" | ||
password "$ossrhPassword" | ||
} | ||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/'" | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications.mavenJava | ||
} | ||
|
||
wrapper { | ||
|
@@ -233,4 +236,4 @@ task uiAutomationTest( type: Test ) { | |
includeTestsMatching 'io.appium.java_client.android.ClipboardTest' | ||
includeTestsMatching '*.AndroidAppStringsTest' | ||
} | ||
} | ||
} |