1+ apply plugin : " maven-publish"
2+ apply plugin : " signing"
3+
14dependencies {
25 implementation project(" :annotations" )
3- implementation ' org.mapstruct:mapstruct:1.4.0-SNAPSHOT'
46 implementation ' com.squareup:javapoet:1.12.1'
57 implementation ' org.apache.commons:commons-lang3:3.10'
68
9+ testImplementation ' org.mapstruct:mapstruct:1.4.0.Final'
710 testImplementation ' org.assertj:assertj-core:3.15.0'
811 testImplementation ' commons-io:commons-io:2.6'
912 testImplementation ' com.google.guava:guava:28.2-jre'
1013 testImplementation ' org.mockito:mockito-junit-jupiter:3.3.3'
1114 testImplementation ' org.springframework:spring-core:5.0.0.RELEASE'
1215}
16+
17+ java {
18+ withJavadocJar()
19+ withSourcesJar()
20+ }
21+
22+ publishing {
23+ publications {
24+ mavenJava(MavenPublication ) {
25+ artifactId = ' mapstruct-spring-extensions'
26+ from components. java
27+ versionMapping {
28+ usage(' java-api' ) {
29+ fromResolutionOf(' runtimeClasspath' )
30+ }
31+ usage(' java-runtime' ) {
32+ fromResolutionResult()
33+ }
34+ }
35+ pom {
36+ licenses {
37+ license {
38+ name = ' The Apache License, Version 2.0'
39+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
40+ }
41+ }
42+ developers {
43+ developer {
44+ name = ' Raimund Klein'
45+ }
46+ }
47+ scm {
48+ connection = ' scm:git:git://github.com/mapstruct/mapstruct-spring-extensions.git'
49+ developerConnection = ' scm:git:git://github.com/mapstruct/mapstruct-spring-extensions.git'
50+ url = ' https://github.com/mapstruct/mapstruct-spring-extensions'
51+ }
52+ }
53+ }
54+ }
55+ repositories {
56+ maven {
57+ // change URLs to point to your repos, e.g. http://my.org/repo
58+ def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
59+ def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
60+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
61+ }
62+ }
63+ }
64+
65+ signing {
66+ useGpgCmd()
67+ sign publishing. publications. mavenJava
68+ }
69+
70+ javadoc {
71+ if (JavaVersion . current(). isJava9Compatible()) {
72+ options. addBooleanOption(' html5' , true )
73+ }
74+ }
0 commit comments