aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/build.gradle.kts
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-10-05 10:24:06 +0200
committerGitHub <noreply@github.com>2020-10-05 10:24:06 +0200
commit49d4757acd8e6ef974baccbb228a76ceb74b59b0 (patch)
tree09ff129568a53a833476763da1c93910e470fc15 /plugins/base/build.gradle.kts
parent249556460973007de3d436ddda1df7d100aefab0 (diff)
downloaddokka-49d4757acd8e6ef974baccbb228a76ceb74b59b0.tar.gz
dokka-49d4757acd8e6ef974baccbb228a76ceb74b59b0.tar.bz2
dokka-49d4757acd8e6ef974baccbb228a76ceb74b59b0.zip
Render react resources as separate css to allow overriding (#1416)
* Render react resources as separate css to allow overriding * Improve build.gradle.kts
Diffstat (limited to 'plugins/base/build.gradle.kts')
-rw-r--r--plugins/base/build.gradle.kts26
1 files changed, 22 insertions, 4 deletions
diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts
index e8335999..8794925a 100644
--- a/plugins/base/build.gradle.kts
+++ b/plugins/base/build.gradle.kts
@@ -18,14 +18,32 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version")
}
-task("copy_frontend", Copy::class) {
- from(File(project(":plugins:base:frontend").projectDir, "dist/"))
+val projectDistDir = project(":plugins:base:frontend").file("dist")
+val generateFrontendFiles = tasks.getByPath(":plugins:base:frontend:generateFrontendFiles")
+
+val copyJsFiles by tasks.registering(Copy::class){
+ from(projectDistDir){
+ include("*.js")
+ }
+ dependsOn(generateFrontendFiles)
destinationDir = File(sourceSets.main.get().resources.sourceDirectories.singleFile, "dokka/scripts")
-}.dependsOn(":plugins:base:frontend:generateFrontendFiles")
+}
+
+val copyCssFiles by tasks.registering(Copy::class){
+ from(projectDistDir){
+ include("*.css")
+ }
+ dependsOn(generateFrontendFiles)
+ destinationDir = File(sourceSets.main.get().resources.sourceDirectories.singleFile, "dokka/styles")
+}
+
+val copyFrontend by tasks.registering {
+ dependsOn(copyJsFiles, copyCssFiles)
+}
tasks {
processResources {
- dependsOn("copy_frontend")
+ dependsOn(copyFrontend)
}
test {