Direct class dependencies from the bytecode as CodeCharta edges (metric dependencies = distinct things used); by default with isCyclic, isPointingUpwards and node levels as ccsh computes them, switchable off for codecharta.com. See docs/prs/2026-10-02-PR#22-codecharta-edges.md. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: mhoennig <michael@hoennig.de> Reviewed-on: #22
79 lines
3.1 KiB
Kotlin
79 lines
3.1 KiB
Kotlin
plugins {
|
|
`java-gradle-plugin`
|
|
`maven-publish`
|
|
}
|
|
|
|
repositories {
|
|
// the Gradle PIT plugin is published on the Gradle Plugin Portal only
|
|
gradlePluginPortal()
|
|
}
|
|
|
|
val pitestGradlePluginVersion = "1.19.0"
|
|
|
|
dependencies {
|
|
implementation(project(":werkcrappit-pit"))
|
|
compileOnly("info.solidsoft.gradle.pitest:gradle-pitest-plugin:$pitestGradlePluginVersion")
|
|
testImplementation("info.solidsoft.gradle.pitest:gradle-pitest-plugin:$pitestGradlePluginVersion")
|
|
}
|
|
|
|
gradlePlugin {
|
|
plugins {
|
|
create("werkcrappit") {
|
|
id = "de.javagil.werkcrappit"
|
|
implementationClass = "de.javagil.werkcrappit.gradle.WerkcrappitPlugin"
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.processResources {
|
|
val version = project.version.toString()
|
|
inputs.property("version", version)
|
|
filesMatching("**/werkcrappit-gradle-plugin.properties") {
|
|
expand("version" to version)
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "functionalTest"
|
|
url = uri(rootProject.layout.buildDirectory.dir("functional-test-repo"))
|
|
}
|
|
}
|
|
}
|
|
|
|
val functionalTest = sourceSets.create("functionalTest")
|
|
|
|
configurations[functionalTest.implementationConfigurationName].extendsFrom(configurations.testImplementation.get())
|
|
// the functional tests see the plugin only as published, never as classes of this build
|
|
configurations[functionalTest.implementationConfigurationName].exclude(group = "info.solidsoft.gradle.pitest")
|
|
configurations[functionalTest.runtimeOnlyConfigurationName].extendsFrom(configurations.testRuntimeOnly.get())
|
|
|
|
dependencies {
|
|
"functionalTestImplementation"(gradleTestKit())
|
|
"functionalTestImplementation"("com.fasterxml.jackson.core:jackson-databind:2.22.3")
|
|
"functionalTestImplementation"("com.networknt:json-schema-validator:3.0.8")
|
|
}
|
|
|
|
val functionalTestTask =
|
|
tasks.register<Test>("functionalTest") {
|
|
description = "Runs the Gradle plugin from the published artifacts in real builds."
|
|
group = "verification"
|
|
testClassesDirs = functionalTest.output.classesDirs
|
|
classpath = functionalTest.runtimeClasspath
|
|
dependsOn("publishAllPublicationsToFunctionalTestRepository")
|
|
dependsOn(":werkcrappit-pit:publishPitPluginPublicationToFunctionalTestRepository")
|
|
systemProperty("werkcrappit.repo", rootProject.layout.buildDirectory.dir("functional-test-repo").get().asFile.absolutePath)
|
|
systemProperty("werkcrappit.version", project.version.toString())
|
|
systemProperty("werkcrappit.pitestVersion", "1.30.0")
|
|
systemProperty("werkcrappit.pitestGradlePluginVersion", pitestGradlePluginVersion)
|
|
systemProperty("werkcrappit.codeChartaSchema",
|
|
project(":werkcrappit-pit").layout.projectDirectory.file("src/test/resources/codecharta/cc-json-2.0.schema.main-364a7449a.json").asFile.absolutePath)
|
|
systemProperty("werkcrappit.codeChartaOriginalSchema",
|
|
project(":werkcrappit-pit").layout.projectDirectory.file("src/test/resources/codecharta/cc-json-2.0.schema.vis-2.7.0.json").asFile.absolutePath)
|
|
}
|
|
|
|
tasks.check {
|
|
dependsOn(functionalTestTask)
|
|
}
|