@@ -10,10 +10,28 @@ allprojects {
10
10
apply from : 干. file(' base/changelog.gradle' )
11
11
}
12
12
apply from : 干. file(' spotless/freshmark.gradle' )
13
+ apply from : 干. file(' helper/javadoc-markdown.gradle' )
13
14
14
15
subprojects { subProject ->
15
16
apply from : 干. file(' base/java8.gradle' )
16
17
18
+ ext. maven_name = subProject. name
19
+ ext. javadoc_links = [
20
+ " https://javadoc.io/doc/com.diffplug.durian/durian-core/${ VER_DURIAN} " ,
21
+ " https://javadoc.io/doc/com.diffplug.durian/durian-collect/${ VER_DURIAN} " ,
22
+ " https://javadoc.io/doc/com.diffplug.durian/durian-concurrent/${ VER_DURIAN} " ,
23
+ " https://javadoc.io/doc/com.diffplug.durian/durian-debug/${ VER_DURIAN_DEBUG} " ,
24
+ " https://javadoc.io/doc/com.diffplug.durian/durian-rx/${ VER_DURIAN_RX} " ,
25
+ " https://javadoc.io/doc/io.reactivex.rxjava2/rxjava/${ VER_RXJAVA} " ,
26
+ ' https://docs.oracle.com/javase/8/docs/api/'
27
+ ]. join(' ' )
28
+
29
+ apply from : 干. file(' base/maven.gradle' )
30
+ apply from : 干. file(' base/bintray.gradle' )
31
+ javadoc {
32
+ options. linksOffline ' https://help.eclipse.org/2019-12/topic/org.eclipse.platform.doc.isv/reference/api/' , rootProject. file(' gradle/javadoc-eclipse' ). absolutePath
33
+ }
34
+
17
35
if (subProject. name == ' durian-swt' ) {
18
36
// configured there
19
37
} else if (subProject. name == ' durian-swt.os' ) {
@@ -59,47 +77,9 @@ subprojects { subProject ->
59
77
' Bundle-SymbolicName' : ' com.diffplug.durian.swt' ,
60
78
' Bundle-RequiredExecutionEnvironment' : ' JavaSE-1.8' ,
61
79
' Bundle-Vendor' : ' DiffPlug' ,
62
- ' Bundle-DocURL' : " https://github.com/${ project.org } / ${ project.name } " ,
63
- ' Bundle-License' : " https://github.com/${ project.org } / ${ project.name } /blob/v${ project.version} /LICENSE" ,
80
+ ' Bundle-DocURL' : " https://github.com/diffplug/durian-swt " ,
81
+ ' Bundle-License' : " https://github.com/diffplug/durian-swt /blob/v${ project.version} /LICENSE" ,
64
82
' -removeheaders' : ' Bnd-LastModified,Bundle-Name,Created-By,Tool' ,
65
83
' -nodefaultversion' : ' true'
66
84
)
67
-
68
- // /////////
69
- // MAVEN //
70
- // /////////
71
- apply plugin : ' maven-publish'
72
- group= ' com.diffplug.durian'
73
-
74
- task sourcesJar(type : Jar ) {
75
- classifier = ' sources'
76
- from sourceSets. main. allJava
77
- }
78
-
79
- def verSnapshot = { it. endsWith(' -SNAPSHOT' ) ? ' snapshot' : it }
80
- // Where it's possible to name parameters and methods clearly enough
81
- // that javadoc is not necessary, why make the code bigger?
82
- //
83
- // Thus, no javadoc warnings.
84
- def makeLink = { url , text -> " <a href=\" ${ url} \" style=\" text-transform: none;\" >${ text} </a>" }
85
- def javadocInfo = ' <h2>' + makeLink(" https://github.com/${ org} /${ name} " , " ${ group} :${ name} :${ version} " ) +
86
- ' by ' + makeLink(' http://www.diffplug.com' , ' DiffPlug' ) + ' </h2>'
87
- javadoc {
88
- options. addStringOption(' Xdoclint:none' , ' -quiet' )
89
- options. header javadocInfo
90
- options. footer javadocInfo
91
- options. links(' https://diffplug.github.io/durian/javadoc/durian-core/' + verSnapshot(VER_DURIAN ) + ' /' )
92
- options. links(' https://diffplug.github.io/durian/javadoc/durian-collect/' + verSnapshot(VER_DURIAN ) + ' /' )
93
- options. links(' https://diffplug.github.io/durian/javadoc/durian-concurrent/' + verSnapshot(VER_DURIAN ) + ' /' )
94
- options. links(' https://diffplug.github.io/durian-debug/javadoc/' + verSnapshot(VER_DURIAN_DEBUG ) + ' /' )
95
- options. links(' https://diffplug.github.io/durian-rx/javadoc/' + verSnapshot(VER_DURIAN_RX ) + ' /' )
96
- options. links(' https://docs.oracle.com/javase/8/docs/api/' )
97
- options. links(' http://reactivex.io/RxJava/javadoc/' )
98
- options. links(' http://help.eclipse.org/luna/nftopic/org.eclipse.platform.doc.isv/reference/api/' )
99
- }
100
-
101
- task javadocJar(type : Jar , dependsOn : javadoc) {
102
- classifier = ' javadoc'
103
- from javadoc. destinationDir
104
- }
105
85
}
0 commit comments