@@ -2,6 +2,7 @@ import org.jetbrains.changelog.Changelog
2
2
import org.jetbrains.changelog.markdownToHTML
3
3
4
4
fun properties (key : String ) = providers.gradleProperty(key)
5
+
5
6
fun environment (key : String ) = providers.environmentVariable(key)
6
7
7
8
plugins {
@@ -17,13 +18,23 @@ group = properties("pluginGroup").get()
17
18
version = properties(" pluginVersion" ).get()
18
19
19
20
// Configure project's dependencies
20
- repositories {
21
- mavenCentral()
21
+ allprojects {
22
+ group = group
23
+ version = version
24
+
25
+ apply (plugin = " java" )
26
+
27
+ repositories {
28
+ mavenCentral()
29
+ }
22
30
}
23
31
24
32
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
25
33
dependencies {
26
- // implementation(libs.exampleLibrary)
34
+ implementation(project(" :mise-products-idea" ))
35
+ implementation(project(" :mise-products-gradle" ))
36
+ implementation(project(" :mise-products-goland" ))
37
+ implementation(project(" :mise-products-nodejs" ))
27
38
}
28
39
29
40
// Set the JVM language level used to build the project.
@@ -38,7 +49,7 @@ intellij {
38
49
type = properties(" platformType" )
39
50
40
51
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
41
- plugins = properties( " platformPlugins " ).map { it. split(' ,' ).map(String ::trim).filter(String ::isNotEmpty) }
52
+ plugins.set( " " . split(' ,' ).map(String ::trim).filter(String ::isNotEmpty))
42
53
}
43
54
44
55
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
@@ -58,6 +69,30 @@ kover {
58
69
}
59
70
}
60
71
72
+ gradle.taskGraph.whenReady(
73
+ closureOf<TaskExecutionGraph > {
74
+ val ignoreSubprojectTasks =
75
+ listOf (
76
+ " buildSearchableOptions" ,
77
+ " listProductsReleases" ,
78
+ " patchPluginXml" ,
79
+ " publishPlugin" ,
80
+ " runIde" ,
81
+ " runPluginVerifier" ,
82
+ " verifyPlugin" ,
83
+ )
84
+
85
+ // Don't run some tasks for subprojects
86
+ for (task in allTasks) {
87
+ if (task.project != task.project.rootProject) {
88
+ when (task.name) {
89
+ in ignoreSubprojectTasks -> task.enabled = false
90
+ }
91
+ }
92
+ }
93
+ },
94
+ )
95
+
61
96
tasks {
62
97
wrapper {
63
98
gradleVersion = properties(" gradleVersion" ).get()
@@ -69,30 +104,32 @@ tasks {
69
104
untilBuild = properties(" pluginUntilBuild" )
70
105
71
106
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
72
- pluginDescription = providers.fileContents(layout.projectDirectory.file(" README.md" )).asText.map {
73
- val start = " <!-- Plugin description -->"
74
- val end = " <!-- Plugin description end -->"
75
-
76
- with (it.lines()) {
77
- if (! containsAll(listOf (start, end))) {
78
- throw GradleException (" Plugin description section not found in README.md:\n $start ... $end " )
107
+ pluginDescription =
108
+ providers.fileContents(layout.projectDirectory.file(" README.md" )).asText.map {
109
+ val start = " <!-- Plugin description -->"
110
+ val end = " <!-- Plugin description end -->"
111
+
112
+ with (it.lines()) {
113
+ if (! containsAll(listOf (start, end))) {
114
+ throw GradleException (" Plugin description section not found in README.md:\n $start ... $end " )
115
+ }
116
+ subList(indexOf(start) + 1 , indexOf(end)).joinToString(" \n " ).let (::markdownToHTML)
79
117
}
80
- subList(indexOf(start) + 1 , indexOf(end)).joinToString(" \n " ).let (::markdownToHTML)
81
118
}
82
- }
83
119
84
120
val changelog = project.changelog // local variable for configuration cache compatibility
85
121
// Get the latest available change notes from the changelog file
86
- changeNotes = properties(" pluginVersion" ).map { pluginVersion ->
87
- with (changelog) {
88
- renderItem(
89
- (getOrNull(pluginVersion) ? : getUnreleased())
90
- .withHeader(false )
91
- .withEmptySections(false ),
92
- Changelog .OutputType .HTML ,
93
- )
122
+ changeNotes =
123
+ properties(" pluginVersion" ).map { pluginVersion ->
124
+ with (changelog) {
125
+ renderItem(
126
+ (getOrNull(pluginVersion) ? : getUnreleased())
127
+ .withHeader(false )
128
+ .withEmptySections(false ),
129
+ Changelog .OutputType .HTML ,
130
+ )
131
+ }
94
132
}
95
- }
96
133
}
97
134
98
135
// Configure UI tests plugin
0 commit comments