Skip to content

Commit 0e5afbc

Browse files
author
minh.tran
committed
sync with template v0.10.0
1 parent 941824d commit 0e5afbc

File tree

6 files changed

+54
-56
lines changed

6 files changed

+54
-56
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
# Check out current repository
2727
- name: Fetch Sources
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v2.3.4
2929

3030
# Validate wrapper
3131
- name: Gradle Wrapper Validation
@@ -40,13 +40,14 @@ jobs:
4040

4141
# Setup Java 1.8 environment for the next steps
4242
- name: Setup Java
43-
uses: actions/setup-java@v1
43+
uses: actions/setup-java@v2
4444
with:
45-
java-version: 1.8
45+
distribution: zulu
46+
java-version: 8
4647

4748
# Check out current repository
4849
- name: Fetch Sources
49-
uses: actions/checkout@v2
50+
uses: actions/checkout@v2.3.4
5051

5152
# Cache Gradle dependencies
5253
- name: Setup Gradle Dependencies Cache
@@ -85,9 +86,10 @@ jobs:
8586

8687
# Setup Java 1.8 environment for the next steps
8788
- name: Setup Java
88-
uses: actions/setup-java@v1
89+
uses: actions/setup-java@v2
8990
with:
90-
java-version: 1.8
91+
distribution: zulu
92+
java-version: 8
9193

9294
# Check out current repository
9395
- name: Fetch Sources
@@ -147,13 +149,14 @@ jobs:
147149

148150
# Setup Java 1.8 environment for the next steps
149151
- name: Setup Java
150-
uses: actions/setup-java@v1
152+
uses: actions/setup-java@v2
151153
with:
152-
java-version: 1.8
154+
distribution: zulu
155+
java-version: 8
153156

154157
# Check out current repository
155158
- name: Fetch Sources
156-
uses: actions/checkout@v2
159+
uses: actions/checkout@v2.3.4
157160

158161
# Cache Gradle Dependencies
159162
- name: Setup Gradle Dependencies Cache
@@ -202,7 +205,7 @@ jobs:
202205

203206
# Check out current repository
204207
- name: Fetch Sources
205-
uses: actions/checkout@v2
208+
uses: actions/checkout@v2.3.4
206209

207210
# Remove old release drafts by using the curl request for the available releases with draft flag
208211
- name: Remove Old Release Drafts
@@ -218,7 +221,7 @@ jobs:
218221
# Create new release draft - which is not publicly visible and requires manual acceptance
219222
- name: Create Release Draft
220223
id: createDraft
221-
uses: actions/create-release@v1
224+
uses: actions/create-release@v1.1.4
222225
env:
223226
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
224227
with:
@@ -236,7 +239,7 @@ jobs:
236239
# Upload artifact as a release asset
237240
- name: Upload Release Asset
238241
id: upload-release-asset
239-
uses: actions/upload-release-asset@v1
242+
uses: actions/upload-release-asset@v1.0.2
240243
env:
241244
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
242245
with:

.github/workflows/release.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ jobs:
1616

1717
# Setup Java 1.8 environment for the next steps
1818
- name: Setup Java
19-
uses: actions/setup-java@v1
19+
uses: actions/setup-java@v2
2020
with:
21-
java-version: 1.8
21+
distribution: zulu
22+
java-version: 8
2223

2324
# Check out current repository
2425
- name: Fetch Sources
25-
uses: actions/checkout@v2
26+
uses: actions/checkout@v2.3.4
2627
with:
2728
ref: ${{ github.event.release.tag_name }}
2829

@@ -41,13 +42,14 @@ jobs:
4142

4243
# Setup Java 1.8 environment for the next steps
4344
- name: Setup Java
44-
uses: actions/setup-java@v1
45+
uses: actions/setup-java@v2
4546
with:
46-
java-version: 1.8
47+
distribution: zulu
48+
java-version: 8
4749

4850
# Check out current repository
4951
- name: Fetch Sources
50-
uses: actions/checkout@v2
52+
uses: actions/checkout@v2.3.4
5153
with:
5254
ref: ${{ github.event.release.tag_name }}
5355

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!-- Keep a Changelog guide -> https://keepachangelog.com -->
22
## [Latest release]
33
- support since-build: 201 and until-build: 211.*
4+
- sync with intellij-platform-plugin-template v0.10.0
45

56
## [1.1.9]
67
- set `explicitToJson: true` by default

build.gradle.kts

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import io.gitlab.arturbosch.detekt.Detekt
2-
import org.jetbrains.changelog.closure
32
import org.jetbrains.changelog.date
43
import org.jetbrains.changelog.markdownToHTML
54
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -10,13 +9,13 @@ plugins {
109
// Java support
1110
id("java")
1211
// Kotlin support
13-
id("org.jetbrains.kotlin.jvm") version "1.5.0"
12+
id("org.jetbrains.kotlin.jvm") version "1.5.10"
1413
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
15-
id("org.jetbrains.intellij") version "0.7.3"
14+
id("org.jetbrains.intellij") version "1.0"
1615
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
1716
id("org.jetbrains.changelog") version "1.1.2"
1817
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
19-
id("io.gitlab.arturbosch.detekt") version "1.16.0"
18+
id("io.gitlab.arturbosch.detekt") version "1.17.1"
2019
// ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle
2120
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
2221
}
@@ -27,33 +26,32 @@ version = properties("pluginVersion")
2726
// Configure project's dependencies
2827
repositories {
2928
mavenCentral()
30-
jcenter()
3129
}
3230
dependencies {
33-
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.16.0")
31+
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.17.1")
3432
}
3533

3634
// Configure gradle-intellij-plugin plugin.
3735
// Read more: https://github.com/JetBrains/gradle-intellij-plugin
3836
intellij {
39-
pluginName = properties("pluginName")
40-
version = properties("platformVersion")
41-
type = properties("platformType")
42-
downloadSources = properties("platformDownloadSources").toBoolean()
43-
updateSinceUntilBuild = true
37+
pluginName.set(properties("pluginName"))
38+
version.set(properties("platformVersion"))
39+
type.set(properties("platformType"))
40+
downloadSources.set(properties("platformDownloadSources").toBoolean())
41+
updateSinceUntilBuild.set(true)
4442

4543
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
46-
setPlugins(*properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty).toTypedArray())
44+
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
4745
}
4846

4947
// Configure gradle-changelog-plugin plugin.
5048
// Read more: https://github.com/JetBrains/gradle-changelog-plugin
5149
changelog {
5250
version = properties("pluginVersion")
5351
keepUnreleasedSection = true
52+
itemPrefix = "-"
5453
unreleasedTerm = "[Latest release]"
5554
groups = emptyList()
56-
closure { "[$version] - ${date()}" }
5755
}
5856

5957
// Configure detekt plugin.
@@ -84,42 +82,36 @@ tasks {
8482
}
8583

8684
patchPluginXml {
87-
version(properties("pluginVersion"))
88-
sinceBuild(properties("pluginSinceBuild"))
89-
untilBuild(properties("pluginUntilBuild"))
85+
version.set(properties("pluginVersion"))
86+
sinceBuild.set(properties("pluginSinceBuild"))
87+
untilBuild.set(properties("pluginUntilBuild"))
9088

9189
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
92-
pluginDescription(
93-
closure {
94-
File("./DESCRIPTION.md")
95-
.readText().lines()
96-
.joinToString("\n")
97-
.run { markdownToHTML(this) }
98-
}
90+
91+
pluginDescription.set(
92+
File("./DESCRIPTION.md")
93+
.readText().lines()
94+
.joinToString("\n")
95+
.run { markdownToHTML(this) }
9996
)
10097

10198
// Get the latest available change notes from the changelog file
102-
103-
changeNotes(
104-
closure {
105-
File("./CHANGELOG.md")
106-
.readText().lines()
107-
.joinToString("\n")
108-
.run { markdownToHTML(this) }
109-
}
110-
)
99+
changeNotes.set(provider { File("./CHANGELOG.md")
100+
.readText().lines()
101+
.joinToString("\n")
102+
.run { markdownToHTML(this) } })
111103
}
112104

113105
runPluginVerifier {
114-
ideVersions(properties("pluginVerifierIdeVersions"))
106+
ideVersions.set(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty))
115107
}
116108

117109
publishPlugin {
118110
dependsOn("patchChangelog")
119-
token(System.getenv("PUBLISH_TOKEN"))
111+
token.set(System.getenv("PUBLISH_TOKEN"))
120112
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
121113
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
122114
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
123-
channels(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())
115+
channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()))
124116
}
125117
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
pluginGroup = com.github.tbm98.fluttergeneratorsnippets
55
pluginName = flutter_generator_snippets
6-
pluginVersion = 1.2.0
6+
pluginVersion = 1.3.0
77
pluginSinceBuild = 201
88
pluginUntilBuild = 211.*
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.2.4, 2020.3.2, 2021.1
11+
pluginVerifierIdeVersions = 2020.2.4, 2020.3.4, 2021.1.2
1212

1313
platformType = IC
1414
platformVersion = 2021.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)