Roman Elizarov | 1f74a2d | 2018-06-29 19:19:45 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
| 3 | */ |
| 4 | |
Kirill Timofeev | a518696 | 2017-10-25 14:25:47 +0300 | [diff] [blame] | 5 | apply plugin: "application" |
| 6 | |
| 7 | sourceSets { |
| 8 | main.kotlin.srcDirs = ['src'] |
| 9 | main.java.srcDirs = ['src'] |
| 10 | main.resources.srcDirs = ['resources'] |
| 11 | } |
| 12 | |
| 13 | FileTree mdFiles = fileTree(project.rootDir) { |
| 14 | include '**/*.md' |
| 15 | exclude '**/build/**' |
Roman Elizarov | cbb602d | 2017-12-23 14:24:26 +0300 | [diff] [blame] | 16 | exclude '**/.gradle/**' |
| 17 | exclude '**/node_modules/**' |
Kirill Timofeev | a518696 | 2017-10-25 14:25:47 +0300 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | mainClassName = "KnitKt" |
| 21 | |
| 22 | run.dependsOn rootProject.getTasksByName("dokka", true) |
| 23 | run.args = mdFiles |
| 24 | run.workingDir = project.rootDir |
| 25 | |
| 26 | task knit(dependsOn: run) |