Qodana integration

This commit is contained in:
Jakub Chrzanowski
2021-09-02 15:05:13 +02:00
committed by Jakub Chrzanowski
parent e3dd698e1e
commit be7db8265f
9 changed files with 90 additions and 17 deletions

View File

@@ -8,10 +8,12 @@ plugins {
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.5.30"
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.1.4"
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "1.3.0"
// Gradle Qodana Plugin
id("org.jetbrains.qodana") version "0.1.12"
}
group = properties("pluginGroup")
@@ -22,8 +24,7 @@ repositories {
mavenCentral()
}
// Configure gradle-intellij-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-intellij-plugin
// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
@@ -35,13 +36,20 @@ intellij {
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
}
// Configure gradle-changelog-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-changelog-plugin
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
version.set(properties("pluginVersion"))
groups.set(emptyList())
}
// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
qodana {
cachePath.set(projectDir.resolve(".qodana").canonicalPath)
reportPath.set(projectDir.resolve("build/reports/inspections").canonicalPath)
saveReport.set(true)
showReport.set(System.getenv("QODANA_SHOW_REPORT").toBoolean())
}
tasks {
// Set the JVM compatibility versions
properties("javaVersion").let {
@@ -65,7 +73,7 @@ tasks {
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription.set(
File(projectDir, "README.md").readText().lines().run {
projectDir.resolve("README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"