Skip to content

Commit c348d61

Browse files
committed
Add a task that creates a tar.gz of the javadoc
1 parent 3fa6751 commit c348d61

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

build.gradle

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,19 @@ allprojects {
2525
}
2626
}
2727
}
28-
}
28+
}
29+
30+
// Create a "copyJavadoc" task that copies the Javadoc to one place
31+
tasks.register('tarJavadoc', Tar) {
32+
archiveFileName = 'javadoc.tar.gz'
33+
compression = Compression.GZIP
34+
destinationDirectory = layout.buildDirectory.dir("docs/javadoc/${gradle.lib_version}")
35+
36+
subprojects.forEach { sub ->
37+
sub.tasks.withType(Javadoc).configureEach { javadocTask ->
38+
from(javadocTask.destinationDir) {
39+
into sub.name
40+
}
41+
}
42+
}
43+
}

buildSrc/src/main/groovy/publishing-conventions.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group = 'com.team2813.lib2813'
6-
version = "2.0.0"
6+
version = gradle.lib_version
77

88
mavenPublishing {
99

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
*/
99

1010
rootProject.name = 'lib2813'
11+
gradle.ext.lib_version = "2.0.0"
1112
include 'core', 'limelight', 'vision', 'testing'
1213
include 'vendor:ctre', 'vendor:rev'

0 commit comments

Comments
 (0)