Skip to content

Commit 7475717

Browse files
dwursteisenclaude
andcommitted
Consume tiny-api.json artifact in tiny-doc build
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f7b4105 commit 7475717

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tiny-doc/build.gradle.kts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ val asciidoctorDependencies by configurations.creating {
2323
isCanBeResolved = true
2424
}
2525

26+
val jsonApiDependencies by configurations.creating {
27+
isCanBeConsumed = false
28+
isCanBeResolved = true
29+
}
30+
2631
dependencies {
2732
add(
2833
asciidoctorResources.name,
@@ -43,6 +48,16 @@ dependencies {
4348
),
4449
),
4550
)
51+
52+
add(
53+
jsonApiDependencies.name,
54+
project(
55+
mapOf(
56+
"path" to ":tiny-engine",
57+
"configuration" to "tinyApiJson",
58+
),
59+
),
60+
)
4661
}
4762

4863
val unzipAsciidoctorResources =
@@ -72,6 +87,12 @@ val copyResources =
7287
into(project.layout.buildDirectory.get().asFile.resolve("docs/asciidoc/resources"))
7388
}
7489

90+
val copyJsonApi =
91+
tasks.maybeCreate("copy-jsonApiDependencies", Copy::class).also { cp ->
92+
cp.into(project.layout.buildDirectory.get().asFile.resolve("docs/asciidoc"))
93+
cp.from(jsonApiDependencies)
94+
}
95+
7596
val copySeoFiles = tasks.register("copy-seoFiles", Copy::class) {
7697
from(project.projectDir.resolve("src/docs/asciidoc")) {
7798
include("robots.txt")
@@ -82,6 +103,7 @@ val copySeoFiles = tasks.register("copy-seoFiles", Copy::class) {
82103
include("showcase.json")
83104
include("tutorials.json")
84105
include("document.json")
106+
include("api.html")
85107
}
86108
into(project.layout.buildDirectory.get().asFile.resolve("docs/asciidoc"))
87109
}
@@ -199,6 +221,7 @@ tasks.withType(AsciidoctorTask::class.java).configureEach {
199221
this.dependsOn(
200222
unzipAsciidoctorResources.dependsOn(":tiny-web-editor:tinyWebEditor"),
201223
copyAsciidoctorDependencies,
224+
copyJsonApi,
202225
copySample,
203226
copyResources,
204227
copySeoFiles,

0 commit comments

Comments
 (0)