code_samples/code_inspection_qodana/build.gradle.kts (21 lines of code) (raw):
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
val codeInspectionPlugin = "code_inspection"
tasks.register<Copy>("stagePluginForQodana") {
val qodanaDir = gradle.includedBuild("qodana_playground").projectDir.resolve(".qodana")
dependsOn(gradle.includedBuild(codeInspectionPlugin).task(":buildPlugin"))
from(gradle.includedBuild(codeInspectionPlugin)
.projectDir.resolve("build/libs"))
include("$codeInspectionPlugin-*.jar")
exclude("$codeInspectionPlugin-*-base.jar")
exclude("$codeInspectionPlugin-*-instrumented.jar")
exclude("$codeInspectionPlugin-*-searchableOptions.jar")
into(qodanaDir)
}
tasks.register<Copy>("buildPlugin") {
group = "build"
description = "Builds the Code Inspection plugin"
val plugin = gradle.includedBuild(codeInspectionPlugin)
dependsOn(plugin.task(":buildPlugin"))
from(plugin.projectDir.resolve("build/distributions"))
include("$codeInspectionPlugin-*.zip")
into("build")
}