diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 903dfff..78658b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 # Validate wrapper - name: Gradle Wrapper Validation @@ -40,13 +40,14 @@ jobs: # Setup Java 1.8 environment for the next steps - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: zulu + java-version: 8 # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 # Cache Gradle dependencies - name: Setup Gradle Dependencies Cache @@ -85,9 +86,10 @@ jobs: # Setup Java 1.8 environment for the next steps - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: zulu + java-version: 8 # Check out current repository - name: Fetch Sources @@ -147,13 +149,14 @@ jobs: # Setup Java 1.8 environment for the next steps - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: zulu + java-version: 8 # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 # Cache Gradle Dependencies - name: Setup Gradle Dependencies Cache @@ -202,7 +205,7 @@ jobs: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 # Remove old release drafts by using the curl request for the available releases with draft flag - name: Remove Old Release Drafts @@ -218,7 +221,7 @@ jobs: # Create new release draft - which is not publicly visible and requires manual acceptance - name: Create Release Draft id: createDraft - uses: actions/create-release@v1 + uses: actions/create-release@v1.1.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -236,7 +239,7 @@ jobs: # Upload artifact as a release asset - name: Upload Release Asset id: upload-release-asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 382fa91..028ffbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,13 +16,14 @@ jobs: # Setup Java 1.8 environment for the next steps - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: zulu + java-version: 8 # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 with: ref: ${{ github.event.release.tag_name }} @@ -41,13 +42,14 @@ jobs: # Setup Java 1.8 environment for the next steps - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: zulu + java-version: 8 # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 with: ref: ${{ github.event.release.tag_name }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 96a517b..8e6d925 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [Latest release] - support since-build: 201 and until-build: 211.* +- sync with intellij-platform-plugin-template v0.10.0 ## [1.1.9] - set `explicitToJson: true` by default diff --git a/build.gradle.kts b/build.gradle.kts index 2e620b2..7d31f94 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,4 @@ import io.gitlab.arturbosch.detekt.Detekt -import org.jetbrains.changelog.closure import org.jetbrains.changelog.date import org.jetbrains.changelog.markdownToHTML import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -10,13 +9,13 @@ plugins { // Java support id("java") // Kotlin support - id("org.jetbrains.kotlin.jvm") version "1.5.0" + id("org.jetbrains.kotlin.jvm") version "1.5.10" // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin - id("org.jetbrains.intellij") version "0.7.3" + id("org.jetbrains.intellij") version "1.0" // gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin id("org.jetbrains.changelog") version "1.1.2" // detekt linter - read more: https://detekt.github.io/detekt/gradle.html - id("io.gitlab.arturbosch.detekt") version "1.16.0" + id("io.gitlab.arturbosch.detekt") version "1.17.1" // ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle id("org.jlleitschuh.gradle.ktlint") version "10.0.0" } @@ -27,23 +26,22 @@ version = properties("pluginVersion") // Configure project's dependencies repositories { mavenCentral() - jcenter() } dependencies { - detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.16.0") + detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.17.1") } // Configure gradle-intellij-plugin plugin. // Read more: https://github.com/JetBrains/gradle-intellij-plugin intellij { - pluginName = properties("pluginName") - version = properties("platformVersion") - type = properties("platformType") - downloadSources = properties("platformDownloadSources").toBoolean() - updateSinceUntilBuild = true + pluginName.set(properties("pluginName")) + version.set(properties("platformVersion")) + type.set(properties("platformType")) + downloadSources.set(properties("platformDownloadSources").toBoolean()) + updateSinceUntilBuild.set(true) // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file. - setPlugins(*properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty).toTypedArray()) + plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty)) } // Configure gradle-changelog-plugin plugin. @@ -51,9 +49,9 @@ intellij { changelog { version = properties("pluginVersion") keepUnreleasedSection = true + itemPrefix = "-" unreleasedTerm = "[Latest release]" groups = emptyList() - closure { "[$version] - ${date()}" } } // Configure detekt plugin. @@ -84,42 +82,36 @@ tasks { } patchPluginXml { - version(properties("pluginVersion")) - sinceBuild(properties("pluginSinceBuild")) - untilBuild(properties("pluginUntilBuild")) + version.set(properties("pluginVersion")) + sinceBuild.set(properties("pluginSinceBuild")) + untilBuild.set(properties("pluginUntilBuild")) // Extract the section from README.md and provide for the plugin's manifest - pluginDescription( - closure { - File("./DESCRIPTION.md") - .readText().lines() - .joinToString("\n") - .run { markdownToHTML(this) } - } + + pluginDescription.set( + File("./DESCRIPTION.md") + .readText().lines() + .joinToString("\n") + .run { markdownToHTML(this) } ) // Get the latest available change notes from the changelog file - - changeNotes( - closure { - File("./CHANGELOG.md") - .readText().lines() - .joinToString("\n") - .run { markdownToHTML(this) } - } - ) + changeNotes.set(provider { File("./CHANGELOG.md") + .readText().lines() + .joinToString("\n") + .run { markdownToHTML(this) } }) } runPluginVerifier { - ideVersions(properties("pluginVerifierIdeVersions")) + ideVersions.set(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty)) } publishPlugin { dependsOn("patchChangelog") - token(System.getenv("PUBLISH_TOKEN")) + token.set(System.getenv("PUBLISH_TOKEN")) // pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel - channels(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()) + channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())) } } diff --git a/gradle.properties b/gradle.properties index 1ba8565..948b451 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,12 +3,12 @@ pluginGroup = com.github.tbm98.fluttergeneratorsnippets pluginName = flutter_generator_snippets -pluginVersion = 1.2.0 +pluginVersion = 1.3.0 pluginSinceBuild = 201 pluginUntilBuild = 211.* # Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl # See https://jb.gg/intellij-platform-builds-list for available build versions -pluginVerifierIdeVersions = 2020.2.4, 2020.3.2, 2021.1 +pluginVerifierIdeVersions = 2020.2.4, 2020.3.4, 2021.1.2 platformType = IC platformVersion = 2021.1 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2a56324..0f80bbf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists