Skip to content

Commit

Permalink
support maven deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin committed Jul 29, 2019
1 parent 97e63b8 commit cbe8772
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ subprojects {
apply plugin: 'com.google.protobuf'
apply plugin: 'idea'
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'signing'

group = 'io.mavsdk'
archivesBaseName = 'mavsdk'
version = '0.1.0'

repositories {
Expand Down Expand Up @@ -84,6 +87,68 @@ subprojects {
}
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}

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 {
name 'MAVSDK-Java'
packaging 'jar'
description 'MAVSDK client for Java.'
url 'https://github.com/mavlink/MAVSDK-Java'

scm {
connection 'scm:git:https://github.com/mavlink/MAVSDK-Java'
developerConnection 'scm:git:https://github.com/mavlink/MAVSDK-Java'
url 'https://github.com/mavlink/MAVSDK-Java'
}

licenses {
license {
name 'BSD 3-Clause "New"'
url 'https://opensource.org/licenses/BSD-3-Clause'
}
}

developers {
developer {
id 'jonasvautherin'
name 'Jonas Vautherin'
email '[email protected]'
}
}
}
}
}
}

task checkstyle(type: Checkstyle) {
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
configDir = project.provider({ rootProject.file("config/checkstyle") })
Expand Down

0 comments on commit cbe8772

Please sign in to comment.