This repository has been archived by the owner on Nov 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
83 lines (69 loc) · 1.89 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.3.50" apply (false)
id("org.jetbrains.dokka") version "0.10.0"
id("com.jfrog.bintray") version "1.8.4" apply (false)
`build-scan`
}
version = "v1.2.0"
tasks.register<Delete>("clean") {
group = "build"
delete(rootProject.buildDir)
}
tasks.register<DokkaTask>("website") {
outputFormat = "jekyll"
subProjects = rootProject.subprojects.map { it.name }
outputDirectory = "$rootDir/docs"
dependsOn(tasks.dokka)
finalizedBy("createJekyllConfig")
}
tasks.register("createJekyllConfig") {
group = "documentation"
doLast {
File("$rootDir/docs/_config.yml")
.also { it.createNewFile() }
.appendText("theme: jekyll-theme-hacker")
}
}
subprojects {
group = "org.mechdancer"
repositories {
mavenCentral()
jcenter()
}
apply {
plugin("org.jetbrains.dokka")
plugin("kotlin")
plugin("java")
plugin("com.jfrog.bintray")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}
tasks.withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
tasks.register<Jar>("javadocJar") {
group = "build"
archiveClassifier.set("javadoc")
from("$buildDir/javadoc")
dependsOn("dokka")
}
tasks.register<Copy>("copyArtifacts") {
group = "build"
from("$buildDir/libs")
into("${rootProject.buildDir}/libs")
}
tasks.withType<DokkaTask> {
outputFormat = "javadoc"
outputDirectory = "$buildDir/javadoc"
}
tasks["javadoc"].dependsOn("dokka")
tasks["jar"].dependsOn("sourcesJar")
tasks["jar"].dependsOn("javadocJar")
tasks["jar"].finalizedBy("copyArtifacts")
}