File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed
Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,28 @@ test {
2626}
2727
2828asciidoctor {
29- sourceDir = file(' src/docs/asciidoc' ) // 👈 index.adoc 위치 지정
29+ // sourceDir, outputDir 등 기존 설정 유지
30+ sourceDir = file(' src/docs/asciidoc' )
3031 outputDir = file(" $buildDir /docs/asciidoc" )
31- inputs. dir snippetsDir
32- dependsOn test
3332
34- attributes ' snippets' : snippetsDir. absolutePath
33+ // snippetsDir가 있을 때만 inputs.dir 등록
34+ if (snippetsDir. exists()) {
35+ inputs. dir snippetsDir
36+ attributes ' snippets' : snippetsDir. absolutePath
37+ } else {
38+ // 디렉터리가 없으면 attributes 설정 제거 또는 기본값 사용 가능
39+ attributes ' snippets' : ' '
40+ }
41+
42+ dependsOn test
3543 baseDirFollowsSourceDir()
44+ // sourceDir = file('src/docs/asciidoc') // 👈 index.adoc 위치 지정
45+ // outputDir = file("$buildDir/docs/asciidoc")
46+ // inputs.dir snippetsDir
47+ // dependsOn test
48+ //
49+ // attributes 'snippets': snippetsDir.absolutePath
50+ // baseDirFollowsSourceDir()
3651}
3752
3853
@@ -49,7 +64,7 @@ build {
4964
5065bootJar {
5166 enabled = true
52- dependsOn asciidoctor
67+ dependsOn asciidoctora
5368 from(' build/docs/asciidoc' ) {
5469 into ' static/docs'
5570 }
You can’t perform that action at this time.
0 commit comments