Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.0 #458

Merged
merged 39 commits into from
Jul 30, 2024
Merged

2.0.0 #458

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a23f859
Gradle 8.8
YannCebron Jun 5, 2024
2fd14cd
Gradle 8.8, fix template cleanup
YannCebron Jun 5, 2024
a746a36
Migrate to IntelliJ Platform Gradle Plugin 2.0 EAP
hsz Feb 20, 2024
be87c6b
Rename Gradle version catalog key for IntelliJ Platform Gradle Plugin…
hsz Feb 20, 2024
c779909
Add `instrumentationTools()` to the dependencies
hsz Feb 27, 2024
aca1a50
testFramework
hsz Mar 5, 2024
da699e9
Release workflow: remove Java (#443)
ForNeVeR Mar 8, 2024
bbaabfe
Plugin publication: fix the channel selector (#444)
ForNeVeR Mar 8, 2024
a53b879
Make the `Run Tests` run configuration use the `RunAsTest` IDE featur…
hsz Mar 8, 2024
38a12bf
Gradle - cleanup the `jvmToolchain` setup
hsz Mar 8, 2024
240e06c
Replace the whole `IntelliJ Platform Plugin Template` with the new pr…
hsz Mar 8, 2024
7202bfa
Gradle - Removed Qodana Gradle Plugin configuration to rely on defaults
hsz Mar 8, 2024
87a8cd9
Run Configurations - `Run Qodana` runs the `qodanaScan` Gradle task
hsz Mar 8, 2024
22f70af
GitHub Template Cleanup: gradle.properties
hsz Mar 11, 2024
f83b2a7
Add Plugin Verifier configuration
hsz Mar 15, 2024
8c641e4
Dependencies - upgrade `org.jetbrains.qodana` to `2023.3.2`
hsz Apr 15, 2024
767bea0
Use IntelliJ Platform Gradle Plugin `2.0.0-beta1`
hsz Apr 15, 2024
51cac26
Update `TestFrameworkType` import
hsz Apr 16, 2024
b4ff5e1
Use IntelliJ Platform Gradle Plugin 2.0 in GitHub Actions
hsz Apr 16, 2024
0999d97
Use IntelliJ Platform Gradle Plugin `2.0.0-beta5`
hsz May 30, 2024
0a59020
Dependencies - upgrade `org.jetbrains.intellij.platform` to `2.0.0-be…
hsz Jun 6, 2024
af9a2b4
GitHub Actions: update the UI Tests task name to `testIdeUi`
hsz Jun 14, 2024
79bea43
2.0.0-beta7
hsz Jun 14, 2024
381a234
2.0.0-beta9
hsz Jul 12, 2024
4a6cef5
Add missing `zipSigner()` dependency
hsz Jul 15, 2024
4bd83f6
Remove `org.gradle.toolchains.foojay-resolver-convention` Gradle plug…
hsz Jul 17, 2024
fefb397
Add `junit:junit:4.13.2` to test dependencies
hsz Jul 18, 2024
14d7920
Merge remote-tracking branch 'origin/main' into 2.0.0
hsz Jul 19, 2024
f43cbe5
Update `org.jetbrains.intellij.platform` to `2.0.0-RC1`
hsz Jul 19, 2024
7fae82c
Bring back `runIdeForUiTests`
hsz Jul 19, 2024
f54d138
Bring back `runIdeForUiTests`
hsz Jul 19, 2024
d455087
Update `org.jetbrains.intellij.platform` to `2.0.0-rc1`
hsz Jul 20, 2024
dc3507c
Update `org.jetbrains.intellij.platform` to `2.0.0-rc1`
hsz Jul 20, 2024
8c3191e
intelliJPlatform = "2.0.0-rc2"
hsz Jul 26, 2024
d320c41
Drop `properties(key)` and `environment(key)` helpers and use provide…
hsz Jul 29, 2024
b947028
Update .run actions
hsz Jul 30, 2024
3506b32
Update `org.jetbrains.intellij.platform` to `2.0.0`
hsz Jul 30, 2024
ef162c2
Dependencies - upgrade `org.jetbrains.changelog` to `2.2.1`
hsz Jul 30, 2024
87e9765
2.0.0
hsz Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/template-cleanup/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ platformType = IC
platformVersion = 2023.2.7

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
platformPlugins =
# Example: platformBundledPlugins = com.intellij.java
platformBundledPlugins =

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.9
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier

# Build plugin
- name: Build plugin
run: ./gradlew buildPlugin
Expand Down Expand Up @@ -214,7 +212,7 @@ jobs:

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

# Update Unreleased section with the current release note
# Update the Unreleased section with the current release note
- name: Patch Changelog
if: ${{ steps.properties.outputs.changelog != '' }}
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gradle
.idea
.intellijPlatform
.qodana
build
25 changes: 0 additions & 25 deletions .run/Run IDE for UI Tests.run.xml

This file was deleted.

24 changes: 0 additions & 24 deletions .run/Run Qodana.run.xml

This file was deleted.

7 changes: 3 additions & 4 deletions .run/Run Verifications.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
</option>
<option name="taskNames">
<list>
<option value="runPluginVerifier" />
<option value="verifyPlugin" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2">
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## [Unreleased]

### Changed

- Migrate to [IntelliJ Platform Gradle Plugin 2.0](https://blog.jetbrains.com/platform/2024/07/intellij-platform-gradle-plugin-2-0/).

## [1.14.2] - 2024-07-12

### Changed
Expand Down Expand Up @@ -47,7 +51,7 @@

- Dependencies - upgrade `org.jetbrains.kotlin.jvm` to `1.9.23`
- Dependencies - upgrade `org.jetbrains.kotlinx.kover` to `0.7.6`
- Dependencies - upgrade `org.jetbrains.qodana` to `2023.3.1`
- Dependencies - upgrade `org.jetbrains.qodana` to `2023.3.2`
- Dependencies (GitHub Actions) - upgrade `actions/upload-artifact` to `4`
- Dependencies (GitHub Actions) - upgrade `codecov/codecov-action` to `4`
- Dependencies (GitHub Actions) - upgrade `gradle/wrapper-validation-action` to `2`
Expand Down
155 changes: 94 additions & 61 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,75 +1,63 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML

fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)
import org.jetbrains.intellij.platform.gradle.Constants.Constraints
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

plugins {
id("java") // Java support
alias(libs.plugins.kotlin) // Kotlin support
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.qodana) // Gradle Qodana Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
}

group = properties("pluginGroup").get()
version = properties("pluginVersion").get()
group = providers.gradleProperty("pluginGroup").get()
version = providers.gradleProperty("pluginVersion").get()

// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(17)
}

// Configure project's dependencies
repositories {
mavenCentral()

// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
intellijPlatform {
defaultRepositories()
}
}

// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
// implementation(libs.exampleLibrary)
}
testImplementation(libs.junit)

// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(17)
}
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))

// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
pluginName = properties("pluginName")
version = properties("platformVersion")
type = properties("platformType")
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins = properties("platformPlugins").map { it.split(',').map(String::trim).filter(String::isNotEmpty) }
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
repositoryUrl = properties("pluginRepositoryUrl")
}
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
kover {
reports {
total {
xml {
onCheck = true
}
}
instrumentationTools()
pluginVerifier()
zipSigner()
testFramework(TestFrameworkType.Platform)
}
}

tasks {
wrapper {
gradleVersion = properties("gradleVersion").get()
}

patchPluginXml {
version = properties("pluginVersion")
sinceBuild = properties("pluginSinceBuild")
untilBuild = properties("pluginUntilBuild")
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
pluginConfiguration {
version = providers.gradleProperty("pluginVersion")

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

Expand All @@ -83,7 +71,7 @@ tasks {

val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
changeNotes = properties("pluginVersion").map { pluginVersion ->
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
Expand All @@ -93,29 +81,74 @@ tasks {
)
}
}
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
ideaVersion {
sinceBuild = providers.gradleProperty("pluginSinceBuild")
untilBuild = providers.gradleProperty("pluginUntilBuild")
}
}

signPlugin {
certificateChain = environment("CERTIFICATE_CHAIN")
privateKey = environment("PRIVATE_KEY")
password = environment("PRIVATE_KEY_PASSWORD")
signing {
certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN")
privateKey = providers.environmentVariable("PRIVATE_KEY")
password = providers.environmentVariable("PRIVATE_KEY_PASSWORD")
}

publishPlugin {
dependsOn("patchChangelog")
token = environment("PUBLISH_TOKEN")
publishing {
token = providers.environmentVariable("PUBLISH_TOKEN")
// The 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").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
channels = providers.gradleProperty("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
}

pluginVerification {
ides {
recommended()
}
}
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
kover {
reports {
total {
xml {
onCheck = true
}
}
}
}

tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
}

publishPlugin {
dependsOn(patchChangelog)
}
}

val runIdeForUiTests by intellijPlatformTesting.runIde.registering {
task {
jvmArgumentProviders += CommandLineArgumentProvider {
listOf(
"-Drobot-server.port=8082",
"-Dide.mac.message.dialogs.as.sheets=false",
"-Djb.privacy.policy.text=<!--999.999-->",
"-Djb.consents.confirmation.enabled=false",
)
}
}

plugins {
robotServerPlugin(Constraints.LATEST_VERSION)
}
}
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = org.jetbrains.plugins.template
pluginName = IntelliJ Platform Plugin Template
pluginRepositoryUrl = https://github.com/JetBrains/intellij-platform-plugin-template
# SemVer format -> https://semver.org
pluginVersion = 1.14.2
pluginVersion = 2.0.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 232
Expand All @@ -15,8 +15,10 @@ platformType = IC
platformVersion = 2023.2.7

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
platformPlugins =
# Example: platformBundledPlugins = com.intellij.java
platformBundledPlugins =

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.9
Expand Down
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[versions]
# libraries
exampleLibrary = "24.1.0"
junit = "4.13.2"

# plugins
changelog = "2.2.1"
intelliJPlatform = "2.0.0"
kotlin = "1.9.24"
changelog = "2.2.0"
gradleIntelliJPlugin = "1.17.4"
qodana = "2024.1.5"
kover = "0.8.1"
qodana = "2024.1.5"

[libraries]
exampleLibrary = { group = "com.example", name = "exampleLibrary", version.ref = "exampleLibrary" }
junit = { group = "junit", name = "junit", version.ref = "junit" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
Loading
Loading