a19bd2ed2e
It's going to be deprecated in Gradle 8.3 There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242 ^KTI-1473 In Progress
42 lines
935 B
Kotlin
42 lines
935 B
Kotlin
plugins {
|
|
id("kotlin")
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
val testArtifacts by configurations.creating
|
|
val signature by configurations.creating
|
|
|
|
sourceSets {
|
|
"main" { none() }
|
|
"test" { kotlin.srcDir("src/test") }
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.codehaus.mojo:animal-sniffer:1.21")
|
|
implementation(kotlinStdlib())
|
|
|
|
testImplementation(project(":kotlin-test:kotlin-test-junit"))
|
|
|
|
testArtifacts(project(":kotlin-reflect"))
|
|
|
|
signature("org.codehaus.mojo.signature:java16:1.1@signature")
|
|
}
|
|
|
|
val signaturesDirectory = layout.buildDirectory.get().asFile.resolve("signatures")
|
|
|
|
val collectSignatures by tasks.registering(Sync::class) {
|
|
from(signature)
|
|
into(signaturesDirectory)
|
|
}
|
|
|
|
tasks.getByName<Test>("test") {
|
|
dependsOn(collectSignatures)
|
|
dependsOn(testArtifacts)
|
|
|
|
systemProperty("kotlinVersion", project.version)
|
|
systemProperty("signaturesDirectory", signaturesDirectory)
|
|
}
|