Skip to content

Commit 4947062

Browse files
author
Nicolai Parlog
committed
Publish Javadoc
Executes `gradle javadoc` in the junit-pioneer project and copies the resulting files into `site/api` so they are available under junit-pioneer.org/api. Given that junit-pioneer.org might eventually host several projects the question arises why not to include the project name in the URL. This was a deliberate decision to allow code to move between projects without breaking links. Once more projects show up, this makes it necessary to find a way to combine their Javadoc.
1 parent bdf6e58 commit 4947062

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ install:
1010
- ./gradlew setup --no-daemon --stacktrace -Pon-travis=true
1111

1212
script:
13-
- ./gradlew buildSite --no-daemon --stacktrace
13+
- ./gradlew buildAll --no-daemon --stacktrace
1414

1515
deploy:
1616
provider: script

build.gradle

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ task create {
110110
dependsOn copyProjectPage, copyDocsPage, copyDocs, insertDocNav
111111
}
112112

113-
// ---------------
114-
// BUILD & PUBLISH
115-
// ---------------
113+
// -----
114+
// BUILD
115+
// -----
116116

117117
task recreate {
118118
dependsOn clean, create
@@ -125,6 +125,26 @@ task buildSite(type: Exec) {
125125
commandLine 'bundle exec jekyll build --destination ../site'.split(' ')
126126
}
127127

128+
task buildJavadoc(type: Exec) {
129+
workingDir 'junit-pioneer'
130+
commandLine './gradlew javadoc --no-daemon'.split(' ')
131+
}
132+
133+
task includeJavadoc(type: Copy) {
134+
dependsOn buildJavadoc, buildSite
135+
136+
from 'junit-pioneer/build/docs/javadoc'
137+
into 'site/api'
138+
}
139+
140+
task buildAll {
141+
dependsOn buildSite, includeJavadoc
142+
}
143+
144+
// -------
145+
// PUBLISH
146+
// -------
147+
128148
task pushSite(type: Exec) {
129149
if (onTravis)
130150
commandLine './git-commit-push.sh launch-ssh'.split(' ')
@@ -133,6 +153,6 @@ task pushSite(type: Exec) {
133153
}
134154

135155
task publishSite {
136-
dependsOn buildSite, pushSite
137-
pushSite.mustRunAfter(buildSite)
156+
dependsOn buildAll, pushSite
157+
pushSite.mustRunAfter buildAll
138158
}

0 commit comments

Comments
 (0)