-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
79 lines (64 loc) · 1.93 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// An example gradle build file for a project that depends on the KSL
plugins {
`java-library`
// uncomment for publishing task
kotlin("jvm") version "1.9.20"
kotlin("plugin.serialization") version "1.9.0"
// id("org.jetbrains.kotlinx.dataframe") version "0.11.0"
id("org.jetbrains.dokka") version "1.9.20"
}
group = "io.github.rossetti"
version = "R1.1.3"
buildscript {
dependencies {
classpath("com.netflix.nebula:gradle-aggregate-javadocs-plugin:2.2.+")
}
}
apply(plugin = "nebula-aggregate-javadocs")
repositories {
mavenCentral()
}
subprojects {
apply(plugin = "org.jetbrains.dokka")
}
dependencies {
api(project(":KSLCore"))
api(project(":KSLExamples"))
implementation(kotlin("stdlib-jdk8"))
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "17"
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "17"
}
// this is supposed to exclude the logback.xml resource file from the generated jar
// this is good because user can then provide their own logging specification
// TODO need reference to why this is good
tasks.jar {
// manifest {
// attributes(
// "Implementation-Title" to project.name,
// "Implementation-Version" to project.version
// )
// }
exclude("logback.xml")
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "17"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "17"
}
// these extensions are needed when publishing to maven
// because maven requires javadoc jar, sources jar, and the build jar
// these jars are placed in build/libs by default
java {
// comment this out to not make jar file with javadocs during normal build
withJavadocJar()
// comment this out to not make jar file with source during normal build
withSourcesJar()
}