Skip to content

Commit 33b942a

Browse files
authored
Support 2021.2 (#48)
* Update build setup * Update README
1 parent 01f5a17 commit 33b942a

File tree

4 files changed

+39
-34
lines changed

4 files changed

+39
-34
lines changed

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
# IntelliJ CUE Language Support Changelog
44

55
## [Unreleased]
6-
### Added
7-
8-
### Changed
9-
106
### Fixed
7+
- Compatibility with 2021.2
8+
119
## [0.8.1]
1210

1311
### Added

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
## Usage
66

7-
The CUE plugin is compatible with **any JetBrains IDE 2020.3**. Only IntelliJ-based IDEs are supported, i.e. it's incompatible with
8-
ReSharper.
7+
The CUE plugin is compatible with **any JetBrains IDE 2020.3**. Only IntelliJ-based IDEs are supported, i.e. it's incompatible with ReSharper.
98

109
### Features
1110

@@ -43,7 +42,7 @@ Development is best in IntelliJ IDEA.
4342

4443
The following plugins are required for development:
4544

46-
- [GrammarKit 2020.3.1](https://plugins.jetbrains.com/plugin/6606-grammar-kit)
45+
- [GrammarKit 2021.1.1](https://plugins.jetbrains.com/plugin/6606-grammar-kit)
4746
- Gradle
4847
- Kotlin, for Gradle build file support
4948

build.gradle.kts

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
import org.jetbrains.changelog.closure
21
import org.jetbrains.changelog.markdownToHTML
32

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+
711
// 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"
1015
}
1116

1217
// Import variables from gradle.properties file
@@ -28,7 +33,6 @@ version = pluginVersion
2833
// Configure project's dependencies
2934
repositories {
3035
mavenCentral()
31-
jcenter()
3236
}
3337

3438
// setup additional source folders
@@ -39,21 +43,21 @@ sourceSets.main {
3943
// Configure gradle-intellij-plugin plugin.
4044
// Read more: https://github.com/JetBrains/gradle-intellij-plugin
4145
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)
4751

4852
// 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())
5054
}
5155

5256
// Configure gradle-changelog-plugin plugin.
5357
// Read more: https://github.com/JetBrains/gradle-changelog-plugin
5458
changelog {
55-
version = pluginVersion
56-
groups = listOf("Added", "Changed", "Fixed")
59+
version.set(pluginVersion)
60+
groups.set(listOf("Added", "Changed", "Fixed"))
5761
}
5862

5963
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
6872
}
6973

7074
patchPluginXml {
71-
version(pluginVersion)
72-
sinceBuild(pluginSinceBuild)
73-
untilBuild(pluginUntilBuild)
75+
version.set(pluginVersion)
76+
sinceBuild.set(pluginSinceBuild)
77+
untilBuild.set(pluginUntilBuild)
7478

7579
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
76-
pluginDescription(closure {
80+
pluginDescription.set(provider {
7781
file("${project.rootDir}/plugin-description.md").readText().run { markdownToHTML(this) }
7882
})
7983

8084
// Get the latest available change notes from the changelog file
81-
changeNotes(closure {
85+
changeNotes.set(provider {
8286
changelog.getLatest().toHTML()
8387
})
8488
}
8589

8690
runPluginVerifier {
87-
ideVersions(pluginVerifierIdeVersions)
91+
ideVersions.set(provider {
92+
pluginVerifierIdeVersions.split(',')
93+
})
8894
}
8995

9096
publishPlugin {
9197
dependsOn("patchChangelog")
92-
token(System.getenv("PUBLISH_TOKEN"))
98+
token.set(System.getenv("PUBLISH_TOKEN"))
99+
93100
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
94101
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
95102
// 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))
97104
}
98105
}
99106

gradle.properties

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33

44
pluginGroup = dev.monogon.cuelang
55
pluginName_ = intellij-cue
6-
pluginVersion = 0.8.1
6+
pluginVersion = 0.8.2
77
pluginSinceBuild = 203
8-
pluginUntilBuild = 211.*
8+
pluginUntilBuild = 212.*
99
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
1010
# See https://jb.gg/intellij-platform-builds-list for available build versions
11-
pluginVerifierIdeVersions = 2020.3.2,IC-211.6432.7
11+
pluginVerifierIdeVersions = 2020.3.2,2021.1.3,2021.2
1212

1313
platformType = IC
1414
platformVersion = 2020.3.2
15-
#platformVersion = 211.6432.7-EAP-SNAPSHOT
15+
#platformVersion = 2021.1.3
16+
#platformVersion = 2021.2
1617
platformDownloadSources = true
1718
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
1819
platformPlugins = org.intellij.intelliLang

0 commit comments

Comments
 (0)