Skip to content

Commit e710fdd

Browse files
committed
build: skip Javadoc generation for demo modules
Configure build to skip Javadoc tasks for all demo modules since they are example applications not part of the published API. This reduces build time and avoids generating unnecessary documentation for non-library code. - Add condition in root build.gradle to skip Javadoc for :demos: modules - Skip both javadoc and javadocJar tasks using onlyIf { false } - Keep Javadoc enabled for main library modules (redis-om-spring, redis-om-spring-ai)
1 parent e646c85 commit e710fdd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ apply from: "spotless.gradle"
2121

2222
subprojects {
2323
apply from: "$rootDir/gradle/build-conventions.gradle"
24+
25+
// Skip Javadoc for demo modules
26+
if (project.path.startsWith(':demos:')) {
27+
tasks.withType(Javadoc) {
28+
onlyIf { false }
29+
}
30+
tasks.matching { it.name == 'javadocJar' }.configureEach {
31+
onlyIf { false }
32+
}
33+
}
2434
}
2535

2636
tasks.register('aggregateTestReport', TestReport) {

demos/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ tasks.matching { it.name.startsWith('publish') }.configureEach {
1818
enabled = false
1919
}
2020

21+
// Javadoc generation is disabled for demo modules in the root build.gradle
22+
2123
repositories {
2224
mavenLocal()
2325
mavenCentral()

0 commit comments

Comments
 (0)