Skip to content

Commit

Permalink
Fixed library references for gradle builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Oct 18, 2024
1 parent 32e3994 commit 2111422
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions UPGRADE_PLUGIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ To upgrade the version of this plugin and publish a new version
See: https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#platformVersions
4. Update the `platformVersion` in `gradle.properties`, only if you want to change the local version of Rider to be used
for testing
5. Check, and update the `intellijPluginVersion`, and `gradleVersion` in `gradle.properties`
6. Rebuild gradle
7. Complete the release process in: [Versioning](CONTRIBUTING.md#Versioning)
5. Check and upgrade the `intellijPluginVersion` in `libs.versions.toml`
6. Check and upgrade the `gradleVersion` in `libs.versions.toml`
7. Rebuild gradle
8. Complete the release process in: [Versioning](CONTRIBUTING.md#Versioning)
24 changes: 10 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,19 @@ repositories {
}

dependencies {
implementation("com.google.code.gson:gson:2.10")
//noinspection GradlePackageUpdate
implementation("com.microsoft.azure:applicationinsights-core:2.6.4") // HACK: we need to stay on this older version of AppInsights for as long as possible
implementation(libs.googleGson)
implementation(libs.microsoftApplicationInsights)

intellijPlatform {
val platformVer: String = providers.gradleProperty("platformVersion").get()
// Do not set useInstaller = true because installer version for some reason do not contain libs/testFramework.jar
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html#setting-up-intellij-platform
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#target-versions
// HACK: Do not set useInstaller = true because installer version for some reason do not contain libs/testFramework.jar
rider(platformVer, useInstaller = false)
jetbrainsRuntime()
pluginVerifier()
zipSigner()
instrumentationTools()

// TestFrameworkType.Platform as of this moment does not work for rider and the warning on this page is wrong.
// HACK: TestFrameworkType.Platform as of this moment does not work for rider and the warning on this page is wrong.
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#testing
testFramework(TestFrameworkType.Bundled)
}
Expand Down Expand Up @@ -92,8 +89,7 @@ changelog {
tasks {

wrapper {
val gradleVer: String = providers.gradleProperty("gradleVersion").get()
gradleVersion = gradleVer
gradleVersion = libs.versions.gradle.get()
}

publishPlugin {
Expand Down Expand Up @@ -137,11 +133,11 @@ tasks {

test {
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.9.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0")
testImplementation("org.mockito:mockito-core:4.8.0")
testImplementation("org.testng:testng:7.7.0")
testRuntimeOnly("org.junit.support:testng-engine:1.0.4")
testImplementation(libs.junitJupiter)
testRuntimeOnly(libs.junitJupiterEngine)
testImplementation(libs.mockito)
testImplementation(libs.testNg)
testRuntimeOnly(libs.testNgEngine)
}

systemProperty("LOCAL_ENV_RUN", "true") //For use with 'BaseTestWithSolution' and TestNG
Expand Down
6 changes: 1 addition & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ pluginSinceBuild=222
pluginUntilBuild=241.*
# platformVersion below is the version of Rider we will be running on and testing with locally
platformVersion=2024.1
# IntelliJ Plugin -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellijPluginVersion=2.1.0
# Gradle Releases -> https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html#requirements
gradleVersion=8.10.2
# Other properties -> https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-gradle-properties.html
org.jetbrains.intellij.platform.downloadSources=false
# Kotlin 1.4 will bundle the stdlib dependency by default, causing problems with the version bundled with the IDE
# https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-rc-released/#stdlib-default
kotlin.stdlib.default.dependency=false
org.gradle.jvmargs = -Xmx1G
org.gradle.jvmargs=-Xmx1G
28 changes: 22 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
[versions]
gradle = "8.10.2" # Gradle Releases -> https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html#requirements
intellijPlatform = "2.1.0" # IntelliJ Plugin -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
kotlin = "1.9.25" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
changelog = "2.2.1"
jvmwrapper = "0.14.0"

# https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
# Apache 2.0 https://github.com/ota4j-team/opentest4j/blob/main/LICENSE
intellijPlatform = "2.1.0"
# runtime
googleGson = "2.10"
microsoftApplicationInsights = "2.6.4" # HACK: we need to stay on this much older version of AppInsights for as long as possible, since it caches locally
# testing
junitJupiter = "5.9.0"
junitJupiterEngine = "5.9.0"
mockito = "4.8.0"
testNg = "7.7.0"
testNgEngine = "1.0.4"

[libraries]
kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
# runtime
googleGson = { group = "com.google.code.gson", name = "gson", version.ref = "googleGson" }
microsoftApplicationInsights = { group = "com.microsoft.azure", name = "applicationinsights-core", version.ref = "microsoftApplicationInsights" }
# testing
junitJupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junitJupiter" }
junitJupiterEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junitJupiterEngine" }
mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
testNg = { group = "org.testng", name = "testng", version.ref = "testNg" }
testNgEngine = { group = "org.junit.support", name = "testng-engine", version.ref = "testNgEngine" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
intellijPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intellijPlatform" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
jvmwrapper = { id = "me.filippov.gradle.jvm.wrapper", version.ref = "jvmwrapper" }
intellijPlatform = { id = "org.jetbrains.intellij.platformr", version.ref = "intellijPlatform" }
6 changes: 0 additions & 6 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
pluginManagement {
val intellijPluginVersion: String by settings

plugins {
id("org.jetbrains.intellij.platform").version(intellijPluginVersion) // so that we can read the version from gradle.properties
}

repositories {
maven { setUrl("https://cache-redirector.jetbrains.com/plugins.gradle.org") }

Expand Down

0 comments on commit 2111422

Please sign in to comment.