-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathbuild.gradle.kts
118 lines (101 loc) · 3.76 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
plugins {
id("java")
kotlin("jvm")
kotlin("libs.publisher")
id("com.github.johnrengelman.shadow") version "7.1.2"
kotlin("plugin.serialization")
}
group = "org.jetbrains.kotlinx.dataframe"
val kotlinVersion: String by project.properties
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
}
sourceSets {
main {
java.setSrcDirs(listOf("src"))
resources.setSrcDirs(listOf("resources"))
}
test {
java.setSrcDirs(listOf("tests", "tests-gen"))
resources.setSrcDirs(listOf("testResources"))
}
}
dependencies {
"org.jetbrains.kotlin:kotlin-compiler:$kotlinVersion".let {
compileOnly(it)
testImplementation(it)
}
testRuntimeOnly("org.jetbrains.kotlin:kotlin-test:$kotlinVersion")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-script-runtime:$kotlinVersion")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-annotations-jvm:$kotlinVersion")
implementation(project(":core"))
api(libs.kotlinLogging)
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0-RC")
testImplementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
testImplementation("org.jetbrains.kotlin:kotlin-compiler-internal-test-framework:$kotlinVersion")
testImplementation(platform("org.junit:junit-bom:5.8.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.platform:junit-platform-commons")
testImplementation("org.junit.platform:junit-platform-launcher")
testImplementation("org.junit.platform:junit-platform-runner")
testImplementation("org.junit.platform:junit-platform-suite-api")
}
tasks.test {
useJUnitPlatform()
jvmArgs("-Xmx2G")
environment("TEST_RESOURCES", project.layout.projectDirectory)
doFirst {
setLibraryProperty("org.jetbrains.kotlin.test.kotlin-stdlib", "kotlin-stdlib")
setLibraryProperty("org.jetbrains.kotlin.test.kotlin-stdlib-jdk8", "kotlin-stdlib-jdk8")
setLibraryProperty("org.jetbrains.kotlin.test.kotlin-reflect", "kotlin-reflect")
setLibraryProperty("org.jetbrains.kotlin.test.kotlin-test", "kotlin-test")
setLibraryProperty("org.jetbrains.kotlin.test.kotlin-script-runtime", "kotlin-script-runtime")
setLibraryProperty("org.jetbrains.kotlin.test.kotlin-annotations-jvm", "kotlin-annotations-jvm")
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs += listOf("-Xfriend-paths=${project(":core").projectDir}")
freeCompilerArgs += "-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi"
freeCompilerArgs += "-Xcontext-receivers"
}
}
tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
tasks.compileKotlin {
kotlinOptions {
languageVersion = "2.0"
jvmTarget = "1.8"
}
}
tasks.compileTestKotlin {
kotlinOptions {
languageVersion = "2.0"
jvmTarget = "1.8"
}
}
tasks.create<JavaExec>("generateTests") {
classpath = sourceSets.test.get().runtimeClasspath
mainClass.set("org.jetbrains.kotlin.fir.dataframe.GenerateTestsKt")
}
fun Test.setLibraryProperty(propName: String, jarName: String) {
val path = project.configurations
.testRuntimeClasspath.get()
.files
.find { """$jarName-\d.*jar""".toRegex().matches(it.name) }
?.absolutePath
?: return
systemProperty(propName, path)
}
kotlinPublications {
fairDokkaJars.set(false)
publication {
publicationName.set("api")
artifactId.set("compiler-plugin-all")
description.set("Data processing in Kotlin")
packageName.set(artifactId)
}
}