@@ -2,13 +2,13 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2
2
import de.undercouch.gradle.tasks.download.Download
3
3
4
4
plugins {
5
- kotlin( " jvm" )
6
- kotlin( " plugin. serialization" )
7
- id( " com.gradle.plugin- publish" )
5
+ alias(libs.plugins.kotlin. jvm)
6
+ alias(libs.plugins.kotlin. serialization)
7
+ alias(libs.plugins. publish.plugin.portal )
8
8
id(" java-gradle-plugin" )
9
9
id(" maven-publish" )
10
- id( " com.github.johnrengelman. shadow" ) version " 7.0.0 "
11
- id( " de.undercouch .download" ) version " 5.3.0 "
10
+ alias(libs.plugins. shadow.jar)
11
+ alias(libs.plugins .download)
12
12
}
13
13
14
14
gradlePluginConfig {
@@ -35,7 +35,7 @@ tasks.named("compileKotlin") {
35
35
dependsOn(buildConfig)
36
36
}
37
37
sourceSets.main.configure {
38
- java.srcDir(buildConfigDir )
38
+ java.srcDir(buildConfig.flatMap { it.generatedOutputDir } )
39
39
}
40
40
41
41
val embeddedDependencies by configurations.creating {
@@ -63,12 +63,10 @@ dependencies {
63
63
testImplementation(gradleTestKit())
64
64
testImplementation(kotlin(" gradle-plugin-api" ))
65
65
66
- // include relocated download task to avoid potential runtime conflicts
67
- embedded(" de.undercouch:gradle-download-task:5.3.0" )
68
-
69
- embedded(" org.jetbrains.kotlinx:kotlinx-serialization-json:${BuildProperties .serializationVersion} " )
70
- embedded(" org.jetbrains.kotlinx:kotlinx-serialization-core:${BuildProperties .serializationVersion} " )
71
- embedded(" org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:${BuildProperties .serializationVersion} " )
66
+ embedded(libs.download.task)
67
+ embedded(libs.serialization.json)
68
+ embedded(libs.serialization.core)
69
+ embedded(libs.serialization.core.jvm)
72
70
embedded(project(" :preview-rpc" ))
73
71
embedded(project(" :jdk-version-probe" ))
74
72
}
@@ -77,7 +75,9 @@ val shadow = tasks.named<ShadowJar>("shadowJar") {
77
75
val fromPackage = " de.undercouch"
78
76
val toPackage = " org.jetbrains.compose.$fromPackage "
79
77
relocate(fromPackage, toPackage)
80
- archiveClassifier.set(" shadow" )
78
+ archiveBaseName.set(" shadow" )
79
+ archiveClassifier.set(" " )
80
+ archiveVersion.set(" " )
81
81
configurations = listOf (embeddedDependencies)
82
82
exclude(" META-INF/gradle-plugins/de.undercouch.download.properties" )
83
83
exclude(" META-INF/versions/**" )
@@ -165,7 +165,7 @@ for (gradleVersion in supportedGradleVersions) {
165
165
configureAllTests {
166
166
dependsOn(" :publishToMavenLocal" )
167
167
systemProperty(" compose.tests.compose.gradle.plugin.version" , BuildProperties .deployVersion(project))
168
- val summaryDir = project.buildDir .resolve(" test-summary" )
168
+ val summaryDir = project.layout.buildDirectory.get().asFile .resolve(" test-summary" )
169
169
systemProperty(" compose.tests.summary.file" , summaryDir.resolve(" $name .md" ).absolutePath)
170
170
systemProperties(project.properties.filter { it.key.startsWith(" compose." ) })
171
171
}
0 commit comments