File tree Expand file tree Collapse file tree 4 files changed +129
-1
lines changed
src/main/java/org/mapstruct/extensions/spring Expand file tree Collapse file tree 4 files changed +129
-1
lines changed Original file line number Diff line number Diff line change 1+ apply plugin : " maven-publish"
2+ apply plugin : " signing"
3+
4+ dependencies {
5+ compileOnly' org.springframework:spring-core:5.0.0.RELEASE'
6+ }
7+
8+ java {
9+ withJavadocJar()
10+ withSourcesJar()
11+ }
12+
13+ publishing {
14+ publications {
15+ mavenJava(MavenPublication ) {
16+ from components. java
17+ versionMapping {
18+ usage(' java-api' ) {
19+ fromResolutionOf(' runtimeClasspath' )
20+ }
21+ usage(' java-runtime' ) {
22+ fromResolutionResult()
23+ }
24+ }
25+ pom {
26+ licenses {
27+ license {
28+ name = ' The Apache License, Version 2.0'
29+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
30+ }
31+ }
32+ developers {
33+ developer {
34+ name = ' Raimund Klein'
35+ }
36+ }
37+ scm {
38+ connection
= ' scm:git:git://[email protected] :mapstruct/mapstruct-spring-extensions.git' 39+ developerConnection
= ' scm:git:ssh://[email protected] :mapstruct/mapstruct-spring-extensions.git' 40+ }
41+ }
42+ }
43+ }
44+ repositories {
45+ maven {
46+ // change URLs to point to your repos, e.g. http://my.org/repo
47+ def releasesRepoUrl = " $buildDir /repos/releases"
48+ def snapshotsRepoUrl = " $buildDir /repos/snapshots"
49+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
50+ }
51+ }
52+ }
53+
54+ signing {
55+ sign publishing. publications. mavenJava
56+ }
57+
58+ javadoc {
59+ if (JavaVersion . current(). isJava9Compatible()) {
60+ options. addBooleanOption(' html5' , true )
61+ }
62+ options. links = [
63+ " https://docs.oracle.com/javase/8/docs/api/" ,
64+ " https://docs.spring.io/spring/docs/5.0.0.RELEASE/javadoc-api/"
65+ ]
66+ }
Original file line number Diff line number Diff line change 66import java .lang .annotation .Target ;
77
88/**
9- * Marks a class or interface as configuration source for the Spring additions . There can be only <em>one</em>
9+ * Marks a class or interface as configuration source for the Spring extension . There can be only <em>one</em>
1010 * annotated type in each compiled module.
1111 *
1212 * @author Raimund Klein
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ plugins {
1010 // Apply the java-library plugin to add support for Java Library
1111 id ' java-library'
1212 id ' jacoco'
13+ id ' maven-publish'
14+ id ' signing'
1315}
1416
1517group = ' org.mapstruct.extensions'
Original file line number Diff line number Diff line change 1+ apply plugin : " maven-publish"
2+ apply plugin : " signing"
3+
14dependencies {
25 implementation project(" :annotations" )
36 implementation ' org.mapstruct:mapstruct:1.4.0-SNAPSHOT'
@@ -10,3 +13,60 @@ dependencies {
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+ from components. java
26+ versionMapping {
27+ usage(' java-api' ) {
28+ fromResolutionOf(' runtimeClasspath' )
29+ }
30+ usage(' java-runtime' ) {
31+ fromResolutionResult()
32+ }
33+ }
34+ pom {
35+ licenses {
36+ license {
37+ name = ' The Apache License, Version 2.0'
38+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
39+ }
40+ }
41+ developers {
42+ developer {
43+ name = ' Raimund Klein'
44+ }
45+ }
46+ scm {
47+ connection
= ' scm:git:git://[email protected] :mapstruct/mapstruct-spring-extensions.git' 48+ developerConnection
= ' scm:git:ssh://[email protected] :mapstruct/mapstruct-spring-extensions.git' 49+ // url = 'http://example.com/my-library/'
50+ }
51+ }
52+ }
53+ }
54+ repositories {
55+ maven {
56+ // change URLs to point to your repos, e.g. http://my.org/repo
57+ def releasesRepoUrl = " $buildDir /repos/releases"
58+ def snapshotsRepoUrl = " $buildDir /repos/snapshots"
59+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
60+ }
61+ }
62+ }
63+
64+ signing {
65+ sign publishing. publications. mavenJava
66+ }
67+
68+ javadoc {
69+ if (JavaVersion . current(). isJava9Compatible()) {
70+ options. addBooleanOption(' html5' , true )
71+ }
72+ }
You can’t perform that action at this time.
0 commit comments