1
1
plugins {
2
2
`kotlin- dsl`
3
- `java- gradle- plugin`
4
3
`maven- publish`
5
- alias(libs.plugins.plugin.publish)
6
- alias(libs.plugins.ktlint)
4
+ with (libs.plugins) {
5
+ alias(buildconfig)
6
+ alias(plugin.publish)
7
+ alias(ktlint)
8
+ }
7
9
}
8
10
9
11
repositories {
@@ -14,26 +16,34 @@ repositories {
14
16
15
17
group = " org.jetbrains.kotlinx.dataframe"
16
18
19
+ buildscript {
20
+ dependencies {
21
+ classpath(embeddedKotlin(" gradle-plugin" ))
22
+ }
23
+ }
24
+
17
25
dependencies {
18
26
api(libs.kotlin.reflect)
19
27
implementation(projects.dataframe)
20
28
// experimental
21
29
implementation(projects.dataframeOpenapiGenerator)
22
30
31
+ compileOnly(embeddedKotlin(" gradle-plugin" ))
23
32
implementation(libs.kotlin.gradle.plugin.api)
24
- implementation(libs.kotlin.gradle.plugin)
25
33
implementation(libs.serialization.core)
26
34
implementation(libs.serialization.json)
27
35
implementation(libs.ksp.gradle)
28
36
implementation(libs.ksp.api)
29
37
30
- testImplementation(libs.junit)
38
+ testImplementation(gradleTestKit())
39
+ testImplementation(embeddedKotlin(" test" ))
40
+ testImplementation(embeddedKotlin(" test-junit" ))
31
41
testImplementation(libs.kotestAssertions)
32
42
testImplementation(libs.android.gradle.api)
33
43
testImplementation(libs.android.gradle)
44
+ testImplementation(embeddedKotlin(" gradle-plugin" ))
34
45
testImplementation(libs.ktor.server.netty)
35
46
testImplementation(libs.h2db)
36
- testImplementation(gradleApi())
37
47
}
38
48
39
49
tasks.withType<ProcessResources > {
@@ -100,7 +110,11 @@ val integrationTestConfiguration by configurations.creating {
100
110
extendsFrom(configurations.testImplementation.get())
101
111
}
102
112
103
- val integrationTestTask = task<Test >(" integrationTest" ) {
113
+ tasks.pluginUnderTestMetadata {
114
+ pluginClasspath.from(integrationTestConfiguration)
115
+ }
116
+
117
+ val integrationTestTask = tasks.register<Test >(" integrationTest" ) {
104
118
dependsOn(" :plugins:symbol-processor:publishToMavenLocal" )
105
119
dependsOn(" :dataframe-arrow:publishToMavenLocal" )
106
120
dependsOn(" :dataframe-excel:publishToMavenLocal" )
@@ -126,3 +140,14 @@ val integrationTestTask = task<Test>("integrationTest") {
126
140
}
127
141
128
142
tasks.check { dependsOn(integrationTestTask) }
143
+
144
+ // fixing linter + buildConfig
145
+ kotlin.sourceSets.create(" buildConfigSources" ) {
146
+ kotlin.srcDir(" build/generated/sources/buildConfig/main" )
147
+ }
148
+ tasks.generateBuildConfig {
149
+ finalizedBy(" runKtlintFormatOverBuildConfigSourcesSourceSet" )
150
+ }
151
+ tasks.named(" runKtlintCheckOverBuildConfigSourcesSourceSet" ) {
152
+ dependsOn(tasks.generateBuildConfig, " runKtlintFormatOverBuildConfigSourcesSourceSet" )
153
+ }
0 commit comments