@@ -4,22 +4,13 @@ import org.jetbrains.changelog.Changelog
4
4
fun properties (key : String ) = providers.gradleProperty(key)
5
5
6
6
plugins {
7
- // Java support
8
- id(" java" )
9
- // Kotlin support
10
- id(" org.jetbrains.kotlin.jvm" ) version " 1.8.10"
11
- // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
12
- id(" org.jetbrains.intellij" ) version " 1.13.2"
13
- // gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
14
- id(" org.jetbrains.changelog" ) version " 2.0.0"
15
- // kotlinx serialization - read more: https://github.com/Kotlin/kotlinx.serialization
16
- kotlin(" plugin.serialization" ) version " 1.6.21"
17
- // detekt linter - read more: https://github.com/detekt/detekt
18
- id(" io.gitlab.arturbosch.detekt" ) version " 1.22.0"
19
- // diktat linter - read more: https://github.com/saveourtool/diktat
20
- id(" org.cqfn.diktat.diktat-gradle-plugin" ) version " 1.2.5"
21
- // Gradle Kover Plugin
22
- id(" org.jetbrains.kotlinx.kover" ) version " 0.6.1"
7
+ id(" java" ) // Java support
8
+ alias(libs.plugins.kotlin) // Kotlin support
9
+ alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
10
+ alias(libs.plugins.changelog) // Gradle Changelog Plugin
11
+ alias(libs.plugins.kotlinSerialization) // Kotlinx serialization
12
+ alias(libs.plugins.gradleDetektPlugin) // Gradle Detekt Plugin
13
+ alias(libs.plugins.gradleDiktatPlugin) // Gradle Diktat Plugin
23
14
}
24
15
25
16
group = properties(" pluginGroup" ).get()
@@ -35,39 +26,35 @@ kotlin {
35
26
jvmToolchain(17 )
36
27
}
37
28
29
+ // Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
38
30
dependencies {
39
- detektPlugins(" io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0 " )
31
+ detektPlugins(libs.detektFormatting )
40
32
41
- implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3 " )
42
- implementation(" org.jetbrains: markdown:0.2.4 " )
43
- implementation(" io .sentry:sentry:6.1.0 " )
33
+ implementation(libs.kotlinxSerializationJson )
34
+ implementation(libs. markdown)
35
+ implementation(libs .sentry)
44
36
}
45
37
46
38
// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
47
39
intellij {
48
- pluginName.set( properties(" pluginName" ) )
49
- version.set( properties(" platformVersion" ) )
50
- type.set( properties(" platformType" ) )
40
+ pluginName = properties(" pluginName" )
41
+ version = properties(" platformVersion" )
42
+ type = properties(" platformType" )
51
43
52
44
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
53
- plugins.set( properties(" platformPlugins" ).map { it.split(' ,' ).map(String ::trim).filter(String ::isNotEmpty) })
45
+ plugins = properties(" platformPlugins" ).map { it.split(' ,' ).map(String ::trim).filter(String ::isNotEmpty) }
54
46
}
55
47
56
48
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
57
49
changelog {
58
50
groups.empty()
59
- repositoryUrl.set(properties(" pluginRepositoryUrl" ))
60
- }
61
-
62
- // Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
63
- kover.xmlReport {
64
- onCheck.set(true )
51
+ repositoryUrl = properties(" pluginRepositoryUrl" )
65
52
}
66
53
67
54
// Configure detekt plugin.
68
55
// Read more: https://detekt.github.io/detekt/kotlindsl.html
69
56
detekt {
70
- config = files (" ./detekt-config.yml" )
57
+ config.setFrom (" ./detekt-config.yml" )
71
58
buildUponDefaultConfig = true
72
59
}
73
60
@@ -88,13 +75,13 @@ tasks {
88
75
}
89
76
90
77
patchPluginXml {
91
- version.set( properties(" pluginVersion" ) )
92
- sinceBuild.set( properties(" pluginSinceBuild" ) )
93
- untilBuild.set( properties(" pluginUntilBuild" ) )
78
+ version = properties(" pluginVersion" )
79
+ sinceBuild = properties(" pluginSinceBuild" )
80
+ untilBuild = properties(" pluginUntilBuild" )
94
81
95
82
val changelog = project.changelog // local variable for configuration cache compatibility
96
83
// Get the latest available change notes from the changelog file
97
- changeNotes.set( properties(" pluginVersion" ).map { pluginVersion ->
84
+ changeNotes = properties(" pluginVersion" ).map { pluginVersion ->
98
85
with (changelog) {
99
86
renderItem(
100
87
(getOrNull(pluginVersion) ? : getUnreleased())
@@ -103,11 +90,11 @@ tasks {
103
90
Changelog .OutputType .HTML ,
104
91
)
105
92
}
106
- })
93
+ }
107
94
}
108
95
109
96
runIde {
110
- maxHeapSize = " 2g "
97
+ maxHeapSize = " 8g "
111
98
}
112
99
113
100
detekt.configure {
0 commit comments