@@ -12,8 +12,11 @@ subprojects {
1212 apply plugin : ' com.google.protobuf'
1313 apply plugin : ' idea'
1414 apply plugin : ' java-library'
15+ apply plugin : ' maven'
16+ apply plugin : ' signing'
1517
1618 group = ' io.mavsdk'
19+ archivesBaseName = ' mavsdk'
1720 version = ' 0.1.0'
1821
1922 repositories {
@@ -84,6 +87,68 @@ subprojects {
8487 }
8588 }
8689
90+ task javadocJar(type : Jar ) {
91+ classifier = ' javadoc'
92+ from javadoc
93+ }
94+
95+ task sourcesJar(type : Jar ) {
96+ classifier = ' sources'
97+ from sourceSets. main. allSource
98+ }
99+
100+ artifacts {
101+ archives javadocJar, sourcesJar
102+ }
103+
104+ signing {
105+ sign configurations. archives
106+ }
107+
108+ uploadArchives {
109+ repositories {
110+ mavenDeployer {
111+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
112+
113+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
114+ authentication(userName : ossrhUsername, password : ossrhPassword)
115+ }
116+
117+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
118+ authentication(userName : ossrhUsername, password : ossrhPassword)
119+ }
120+
121+ pom. project {
122+ name ' MAVSDK-Java'
123+ packaging ' jar'
124+ description ' MAVSDK client for Java.'
125+ url ' https://github.com/mavlink/MAVSDK-Java'
126+
127+ scm {
128+ connection ' scm:git:https://github.com/mavlink/MAVSDK-Java'
129+ developerConnection ' scm:git:https://github.com/mavlink/MAVSDK-Java'
130+ url ' https://github.com/mavlink/MAVSDK-Java'
131+ }
132+
133+ licenses {
134+ license {
135+ name ' BSD 3-Clause "New"'
136+ url ' https://opensource.org/licenses/BSD-3-Clause'
137+ }
138+ }
139+
140+ developers {
141+ developer {
142+ id ' jonasvautherin'
143+ name ' Jonas Vautherin'
144+ 145+ }
146+ }
147+ }
148+ }
149+ }
150+ }
151+
87152 task checkstyle(type : Checkstyle ) {
88153 configFile = rootProject. file(" config/checkstyle/checkstyle.xml" )
89154 configDir = project. provider({ rootProject. file(" config/checkstyle" ) })
0 commit comments