Skip to content

Commit 0bb5130

Browse files
committed
Downgrade Gradle to avoid using API incompatible with older versions
1 parent 0e3fdcd commit 0bb5130

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

core/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ tasks.withType<Jar> {
266266
}
267267

268268
// modify all publishing tasks to depend on `changeJarTask` so the sources are swapped out with generated sources
269-
tasks.named { it.startsWith("publish") }.configureEach {
270-
dependsOn(processKDocsMain, changeJarTask)
269+
tasks.configureEach {
270+
if (name.startsWith("publish")) {
271+
dependsOn(processKDocsMain, changeJarTask)
272+
}
271273
}
272274

273275
// Exclude the generated/processed sources from the IDE
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

plugins/dataframe-gradle-plugin/src/main/kotlin/org/jetbrains/dataframe/gradle/ConvenienceSchemaGeneratorPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class ConvenienceSchemaGeneratorPlugin : Plugin<Project> {
7070
val cfgsToAdd = configs.toMutableSet()
7171

7272
configs.forEach { cfg ->
73-
target.configurations.named { it == cfg }.configureEach {
73+
target.configurations.findByName(cfg)?.apply {
7474
cfgsToAdd.remove(cfg)
7575
dependencies.add(
7676
target.dependencies.create(

plugins/dataframe-gradle-plugin/src/test/kotlin/org/jetbrains/dataframe/gradle/GradleRunnerDsl.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ fun runGradleBuild(
2222
fun gradleRunner(buildDir: File, task: String): GradleRunner =
2323
GradleRunner.create()
2424
.withProjectDir(buildDir)
25+
// if we use api from the newest Gradle release, a user project will fail with NoSuchMethod
26+
// testing compatibility with an older Gradle version ensures our plugin can run on as many versions as possible
27+
.withGradleVersion("8.5")
2528
.withPluginClasspath()
2629
.withArguments(task, "--stacktrace", "--info")
2730
.withDebug(true)

0 commit comments

Comments
 (0)