1- import java.net.URI
2-
31plugins {
42 id(" java-library" )
53 id(" java-gradle-plugin" )
6- id(" maven-publish" )
7- id(" signing" )
4+ id(" com.vanniktech.maven.publish" )
85}
96
10- tasks.withType<Javadoc >().configureEach {
11- setDestinationDir(layout.projectDirectory.file(" docs/" ).asFile)
7+ afterEvaluate {
8+ tasks.named(" generateMetadataFileForPluginMavenPublication" ) {
9+ dependsOn(" plainJavadocJar" )
10+ }
1211}
1312
14- publishing {
15- repositories {
16- maven {
17- name = " ossrh"
18- url = URI .create(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
19- credentials {
20- username = findProperty(" ossrhUsername" ).toString()
21- password = findProperty(" ossrhPassword" ).toString()
22- }
23- }
24- }
13+ mavenPublishing {
14+ coordinates(" dev.eidentification" , " bankid-sdk" , version = version.toString())
2515
26- publications {
27- create<MavenPublication >(" maven" ) {
28- from(components[" java" ])
29- pom {
30- name = " BankID SDK"
31- artifactId = " bankid-sdk"
32- description = " A SDK to interact with the BankID API"
33- url = " https://github.com/NicklasWallgren/bankid-java"
34- scm {
35- connection = " scm:git:git://github.com/NicklasWallgren/bankid-java.git"
36- developerConnection = " scm:git:ssh://github.com/NicklasWallgren/bankid-java.git"
37- url = " https://github.com/NicklasWallgren/bankid-java"
38- }
39- licenses {
40- license {
41- name = " MIT Licence"
42- url = " https://github.com/NicklasWallgren/bankid-java/blob/master/LICENSE"
43- }
44- }
45- developers {
46- developer {
47- id = " nicklas"
48- name = " NicklasWallgren"
49- email = " nicklas.wallgren@gmail.com"
50- }
51- }
52- }
53- }
54- }
55- }
16+ signAllPublications()
5617
57- signing {
58- sign(publishing.publications[" maven" ])
18+ pom {
19+ name.set(" BankID SDK" )
20+ description.set(" A SDK to interact with the BankID API." )
21+ url.set(" https://github.com/NicklasWallgren/bankid-java" )
22+ licenses {
23+ license {
24+ name.set(" MIT Licence" )
25+ url.set(" https://github.com/NicklasWallgren/bankid-java/blob/master/LICENSE" )
26+ distribution.set(" https://github.com/NicklasWallgren/bankid-java/blob/master/LICENSE" )
27+ }
28+ }
29+ developers {
30+ developer {
31+ id.set(" nicklas" )
32+ name.set(" NicklasWallgren" )
33+ url.set(" nicklas.wallgren@gmail.com" )
34+ }
35+ }
36+ scm {
37+ url.set(" https://github.com/NicklasWallgren/bankid-java" )
38+ connection.set(" scm:git:git://github.com/NicklasWallgren/bankid-java.git" )
39+ developerConnection.set(" scm:git:ssh://github.com/NicklasWallgren/bankid-java.git" )
40+ }
41+ }
5942}
0 commit comments