1
- import org.jetbrains.changelog.closure
2
1
import org.jetbrains.changelog.markdownToHTML
3
2
4
- plugins { // Java support
5
- id(" java" ) // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
6
- id(" org.jetbrains.intellij" ) version " 0.7.2"
3
+ plugins {
4
+
5
+ // Java support
6
+ id(" java" )
7
+
8
+ // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
9
+ id(" org.jetbrains.intellij" ) version " 1.1.4"
10
+
7
11
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
8
- id(" org.jetbrains.changelog" ) version " 1.1.2"
9
- id(" org.jetbrains.grammarkit" ) version " 2020.3.2"
12
+ id(" org.jetbrains.changelog" ) version " 1.2.1"
13
+
14
+ id(" org.jetbrains.grammarkit" ) version " 2021.1.3"
10
15
}
11
16
12
17
// Import variables from gradle.properties file
@@ -28,7 +33,6 @@ version = pluginVersion
28
33
// Configure project's dependencies
29
34
repositories {
30
35
mavenCentral()
31
- jcenter()
32
36
}
33
37
34
38
// setup additional source folders
@@ -39,21 +43,21 @@ sourceSets.main {
39
43
// Configure gradle-intellij-plugin plugin.
40
44
// Read more: https://github.com/JetBrains/gradle-intellij-plugin
41
45
intellij {
42
- pluginName = pluginName_
43
- version = platformVersion
44
- type = platformType
45
- downloadSources = platformDownloadSources.toBoolean()
46
- updateSinceUntilBuild = true
46
+ pluginName.set( pluginName_)
47
+ version.set( platformVersion)
48
+ type.set( platformType)
49
+ downloadSources.set( platformDownloadSources.toBoolean() )
50
+ updateSinceUntilBuild.set( true )
47
51
48
52
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
49
- setPlugins( * platformPlugins.split(' ,' ).map(String ::trim).filter(String ::isNotEmpty).toTypedArray ())
53
+ plugins.set( platformPlugins.split(' ,' ).map(String ::trim).filter(String ::isNotEmpty).toList ())
50
54
}
51
55
52
56
// Configure gradle-changelog-plugin plugin.
53
57
// Read more: https://github.com/JetBrains/gradle-changelog-plugin
54
58
changelog {
55
- version = pluginVersion
56
- groups = listOf (" Added" , " Changed" , " Fixed" )
59
+ version.set( pluginVersion)
60
+ groups.set( listOf (" Added" , " Changed" , " Fixed" ) )
57
61
}
58
62
59
63
tasks { // disable building searchable options to speed up build, we currently don't settings UI
@@ -68,32 +72,35 @@ tasks { // disable building searchable options to speed up build, we currently d
68
72
}
69
73
70
74
patchPluginXml {
71
- version(pluginVersion)
72
- sinceBuild(pluginSinceBuild)
73
- untilBuild(pluginUntilBuild)
75
+ version.set (pluginVersion)
76
+ sinceBuild.set (pluginSinceBuild)
77
+ untilBuild.set (pluginUntilBuild)
74
78
75
79
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
76
- pluginDescription(closure {
80
+ pluginDescription.set(provider {
77
81
file(" ${project.rootDir} /plugin-description.md" ).readText().run { markdownToHTML(this ) }
78
82
})
79
83
80
84
// Get the latest available change notes from the changelog file
81
- changeNotes(closure {
85
+ changeNotes.set(provider {
82
86
changelog.getLatest().toHTML()
83
87
})
84
88
}
85
89
86
90
runPluginVerifier {
87
- ideVersions(pluginVerifierIdeVersions)
91
+ ideVersions.set(provider {
92
+ pluginVerifierIdeVersions.split(' ,' )
93
+ })
88
94
}
89
95
90
96
publishPlugin {
91
97
dependsOn(" patchChangelog" )
92
- token(System .getenv(" PUBLISH_TOKEN" ))
98
+ token.set(System .getenv(" PUBLISH_TOKEN" ))
99
+
93
100
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
94
101
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
95
102
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
96
- channels(pluginVersion.split(' -' ).getOrElse(1 ) { " default" }.split(' .' ).first( ))
103
+ channels.set (pluginVersion.split(' -' ).getOrElse(1 ) { " default" }.split(' .' ).take( 1 ))
97
104
}
98
105
}
99
106
0 commit comments