Skip to content

Commit

Permalink
Feature/2025.1 update deprecated v2 (#37)
Browse files Browse the repository at this point in the history
* remove deprecated warnings

* updated plugin version... also hardcode gradle intellijplatform to 2024.3.3

* ADD junit4 to test dependencies

* use .properties file for version
  • Loading branch information
cschar authored Feb 17, 2025
1 parent 7bfaf62 commit 2a3bdec
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 35 deletions.
63 changes: 32 additions & 31 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ version = properties("pluginVersion").get()
// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(17)
// jvmToolchain(21)
}

// Configure project's dependencies
Expand All @@ -48,6 +49,26 @@ var remoteRobotVersion = "0.11.23"

// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
create(properties("platformType"), properties("platformVersion"))
// intellijIdeaCommunity("2024.3.3")

// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
bundledPlugins(properties("platformBundledPlugins").map { it.split(',') })

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(properties("platformPlugins").map { it.split(',') })


pluginVerifier()
testFramework(TestFrameworkType.Platform)


// https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/1638#issuecomment-2151527333
// jetbrainsRuntime()
}

// implementation(libs.exampleLibrary)


Expand All @@ -66,6 +87,7 @@ dependencies {
testImplementation("com.intellij.remoterobot:remote-fixtures:$remoteRobotVersion")
testImplementation("org.junit.jupiter:junit-jupiter:5.7.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
// Logging Network Calls
testImplementation("com.squareup.okhttp3:logging-interceptor:4.9.1")
Expand All @@ -80,24 +102,7 @@ dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher")


// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
create(properties("platformType"), properties("platformVersion"))

// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
bundledPlugins(properties("platformBundledPlugins").map { it.split(',') })

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(properties("platformPlugins").map { it.split(',') })

instrumentationTools()
pluginVerifier()
testFramework(TestFrameworkType.Platform)


// https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/1638#issuecomment-2151527333
// jetbrainsRuntime()
}
}

// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
Expand Down Expand Up @@ -151,11 +156,7 @@ intellijPlatform {
channels = properties("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
}

verifyPlugin {
ides {
recommended()
}
}

}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
Expand Down Expand Up @@ -212,15 +213,15 @@ tasks {

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
testIdeUi {
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")
// Newer IntelliJ versions require this property to avoid trust project popup
systemProperty("idea.trust.all.projects", "true")
systemProperty("ide.show.tips.on.startup.default.value", "false")
}
// testIdeUi {
// 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")
// // Newer IntelliJ versions require this property to avoid trust project popup
// systemProperty("idea.trust.all.projects", "true")
// systemProperty("ide.show.tips.on.startup.default.value", "false")
// }


publishPlugin {
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ platformType = IC
# https://youtrack.jetbrains.com/articles/IDEA-A-21/IDEA-Latest-Builds-And-Release-Notes
# Find the platformVersion there
#platformVersion = 251.18673.35
platformVersion = 242.14146.16
#platformVersion = 2024.1.2
#platformVersion = 243.24978.46
platformVersion = 2024.3.3

#platformVersion = LATEST-EAP-SNAPSHOT

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ exampleLibrary = "24.1.0"

# plugins
changelog = "2.2.0"
intelliJPlatform = "2.0.0-beta7"
kotlin = "2.0.0"
intelliJPlatform = "2.2.1"
kotlin = "2.1.10"
kover = "0.8.0"
qodana = "2024.1.5"

Expand Down

0 comments on commit 2a3bdec

Please sign in to comment.