diff --git a/Shared b/Shared
index d99c09a..e992472 160000
--- a/Shared
+++ b/Shared
@@ -1 +1 @@
-Subproject commit d99c09a47a37dfa14825e3e8292478dd86559ac5
+Subproject commit e992472d812c2b1c39f6b0e4b5c4d3bbfceaee37
diff --git a/Src/RiderPlugin/build.gradle b/Src/RiderPlugin/build.gradle
deleted file mode 100644
index 8e14fa7..0000000
--- a/Src/RiderPlugin/build.gradle
+++ /dev/null
@@ -1,50 +0,0 @@
-plugins {
- id 'java'
- id 'org.jetbrains.kotlin.jvm' version '1.8.22' // https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
- id 'org.jetbrains.intellij' version '1.13.3' // https://github.com/JetBrains/gradle-intellij-plugin/releases
-}
-
-repositories {
- maven { url 'https://cache-redirector.jetbrains.com/intellij-repository/snapshots' }
- maven { url 'https://cache-redirector.jetbrains.com/maven-central' }
-}
-
-version = version != 'unspecified' ? version : '0.0.0.1'
-
-if (!project.hasProperty('configuration')) ext.configuration = 'Debug'
-
-intellij {
- type = 'RD'
- version = gradle.ext.productVersion
- downloadSources = false
- instrumentCode = false
-}
-
-compileKotlin {
- kotlinOptions { jvmTarget = "17" }
-}
-
-prepareSandbox {
- from("$projectDir/../${gradle.ext.resharperPluginProjectName}/bin/${gradle.ext.reSharperVersionIdentifier}/$configuration", {
- into "${rootProject.name}/dotnet"
- include "${gradle.ext.resharperPluginProjectName}*"
- })
-}
-
-patchPluginXml {
- def historyText = file("$projectDir/../../History.md").text
- def historyMatches = historyText =~ /(?s)###(.+?)###(.+?)(?=###|$)/
-
- changeNotes = historyMatches.collect {
- def versionTitle = it[1]
- def versionText = it[2].replaceAll(/(?s)\r?\n/, "
\n")
- "$versionTitle$versionText"
- }.take(10).join('')
-
- //sinceBuild = "1xx.*"
-}
-
-runIde {
- //configDirectory = System.properties['user.home'] + '/.RiderPluginDev/config'
- //systemDirectory = System.properties['user.home'] + '/.RiderPluginDev/system'
-}
diff --git a/Src/RiderPlugin/build.gradle.kts b/Src/RiderPlugin/build.gradle.kts
new file mode 100644
index 0000000..6e7ef75
--- /dev/null
+++ b/Src/RiderPlugin/build.gradle.kts
@@ -0,0 +1,79 @@
+plugins {
+ id("java")
+ alias(libs.plugins.kotlinJvm)
+ id("org.jetbrains.intellij.platform") version "2.0.1" // https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
+ id("me.filippov.gradle.jvm.wrapper") version "0.14.0" // https://plugins.gradle.org/plugin/me.filippov.gradle.jvm.wrapper
+}
+
+val ResharperPluginProjectName: String by project
+val ReSharperVersionIdentifier: String by project
+val BuildConfiguration: String by project
+val ProductVersion: String by project
+
+allprojects {
+ repositories {
+ maven { setUrl("https://cache-redirector.jetbrains.com/maven-central") }
+ }
+}
+
+repositories {
+ intellijPlatform {
+ defaultRepositories()
+ jetbrainsRuntime()
+ }
+}
+
+tasks.wrapper {
+ gradleVersion = "8.8"
+ distributionType = Wrapper.DistributionType.ALL
+ distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
+}
+
+version = extra["PluginVersion"] as String
+
+tasks.processResources {
+ from("dependencies.json") { into("META-INF") }
+}
+
+sourceSets {
+ main {
+ java.srcDir("src/rider/main/java")
+ kotlin.srcDir("src/rider/main/kotlin")
+ resources.srcDir("src/rider/main/resources")
+ }
+}
+
+tasks.compileKotlin {
+ kotlinOptions { jvmTarget = "17" }
+}
+
+dependencies {
+ intellijPlatform {
+ rider(ProductVersion)
+ jetbrainsRuntime()
+ instrumentationTools()
+ }
+}
+
+tasks.runIde {
+ // Match Rider's default heap size of 1.5Gb (default for runIde is 512Mb)
+ maxHeapSize = "1500m"
+}
+
+tasks.patchPluginXml {
+ val changelogText = file("${rootDir}/../../History.md").readText()
+ val changelogMatches = Regex("(?s)###(.+?)###(.+?)(?=###|\$)").findAll(changelogText)
+
+ changeNotes = changelogMatches.map {
+ val versionTitle = it.groups[1]!!.value
+ val versionText = it.groups[2]!!.value.replace("(?s)\r?\n".toRegex(), "
\n")
+ "$versionTitle$versionText"
+ }.take(10).joinToString()
+}
+
+tasks.prepareSandbox {
+ from("${rootDir}/../${ResharperPluginProjectName}/bin/${ReSharperVersionIdentifier}/${BuildConfiguration}") {
+ include("${ResharperPluginProjectName}*")
+ into("${rootProject.name}/dotnet")
+ }
+}
diff --git a/Src/RiderPlugin/gradle.properties b/Src/RiderPlugin/gradle.properties
index 55a9b3c..249a6ba 100644
--- a/Src/RiderPlugin/gradle.properties
+++ b/Src/RiderPlugin/gradle.properties
@@ -1,5 +1,16 @@
-# Kotlin 1.4 will bundle the stdlib dependency by default, causing problems with the version bundled with the IDE
+RiderPluginProjectName=rider-XmlDocInspections
+
+ResharperPluginProjectName=XmlDocInspections.Plugin
+ReSharperVersionIdentifier=RD20242
+PluginVersion=0.0.0.1
+BuildConfiguration=Debug
+
+# https://www.jetbrains.com/intellij-repository/releases
+ProductVersion=2024.2
+
+# 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=-Xmx2048M
+# Required to download Rider artifacts from Maven (and not "binary" releases from CDN).
+org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false
diff --git a/Src/RiderPlugin/gradle/libs.versions.toml b/Src/RiderPlugin/gradle/libs.versions.toml
new file mode 100644
index 0000000..cd40186
--- /dev/null
+++ b/Src/RiderPlugin/gradle/libs.versions.toml
@@ -0,0 +1,10 @@
+[versions]
+kotlin = "1.9.24" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
+#rdGen = "2024.1.1" # https://github.com/JetBrains/rd/releases
+
+[libraries]
+kotlinStdLib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
+#rdGen = { group = "com.jetbrains.rd", name = "rd-gen", version.ref = "rdGen" }
+
+[plugins]
+kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
diff --git a/Src/RiderPlugin/gradle/wrapper/gradle-wrapper.jar b/Src/RiderPlugin/gradle/wrapper/gradle-wrapper.jar
index 943f0cb..e644113 100644
Binary files a/Src/RiderPlugin/gradle/wrapper/gradle-wrapper.jar and b/Src/RiderPlugin/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/Src/RiderPlugin/gradle/wrapper/gradle-wrapper.properties b/Src/RiderPlugin/gradle/wrapper/gradle-wrapper.properties
index 183cef7..7776c6b 100644
--- a/Src/RiderPlugin/gradle/wrapper/gradle-wrapper.properties
+++ b/Src/RiderPlugin/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-7.6-all.zip
+distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/Src/RiderPlugin/gradlew b/Src/RiderPlugin/gradlew
index 7689b57..57b7436 100644
--- a/Src/RiderPlugin/gradlew
+++ b/Src/RiderPlugin/gradlew
@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -131,7 +129,7 @@ if [ "$darwin" = "true" ]; then
JVM_URL=https://download.oracle.com/java/17/archive/jdk-17.0.3.1_macos-aarch64_bin.tar.gz
JVM_TARGET_DIR=$BUILD_DIR/jdk-17.0.3.1_macos-aarch64_bin-297fa2
;;
- *)
+ *)
die "Unknown architecture $JVM_ARCH"
;;
esac
@@ -149,7 +147,7 @@ else
JVM_URL=https://download.oracle.com/java/17/archive/jdk-17.0.3.1_linux-aarch64_bin.tar.gz
JVM_TARGET_DIR=$BUILD_DIR/jdk-17.0.3.1_linux-aarch64_bin-319da6
;;
- *)
+ *)
die "Unknown architecture $JVM_ARCH"
;;
esac
@@ -184,7 +182,7 @@ else
*".zip") unzip "$JVM_TEMP_FILE" -d "$JVM_TARGET_DIR" ;;
*) tar -x -f "$JVM_TEMP_FILE" -C "$JVM_TARGET_DIR" ;;
esac
-
+
rm -f "$JVM_TEMP_FILE"
echo "$JVM_URL" >"$JVM_TARGET_DIR/.flag"
@@ -224,10 +222,13 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
@@ -235,7 +236,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
+ # shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -243,7 +244,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
+ # shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -288,11 +289,15 @@ if "$cygwin" || "$msys" ; then
done
fi
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
diff --git a/Src/RiderPlugin/gradlew.bat b/Src/RiderPlugin/gradlew.bat
index 41570ca..279d410 100644
--- a/Src/RiderPlugin/gradlew.bat
+++ b/Src/RiderPlugin/gradlew.bat
@@ -119,11 +119,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -133,11 +133,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
diff --git a/Src/RiderPlugin/settings.gradle b/Src/RiderPlugin/settings.gradle
deleted file mode 100644
index 31c9e98..0000000
--- a/Src/RiderPlugin/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-rootProject.name = 'rider-XmlDocInspections'
-gradle.ext.resharperPluginProjectName = 'XmlDocInspections.Plugin'
-gradle.ext.productVersion = '2024.2-SNAPSHOT' // https://www.jetbrains.com/intellij-repository/releases
-gradle.ext.reSharperVersionIdentifier = 'RD20242'
diff --git a/Src/RiderPlugin/settings.gradle.kts b/Src/RiderPlugin/settings.gradle.kts
new file mode 100644
index 0000000..2767319
--- /dev/null
+++ b/Src/RiderPlugin/settings.gradle.kts
@@ -0,0 +1,13 @@
+
+pluginManagement {
+ // Provide repositories to resolve plugins
+ repositories {
+ maven { setUrl("https://cache-redirector.jetbrains.com/plugins.gradle.org") }
+ maven { setUrl("https://cache-redirector.jetbrains.com/maven-central") }
+ maven { setUrl("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-eap") }
+ }
+}
+
+val RiderPluginProjectName: String by settings
+
+rootProject.name = RiderPluginProjectName
diff --git a/Src/RiderPlugin/src/main/resources/META-INF/plugin.xml b/Src/RiderPlugin/src/main/resources/META-INF/plugin.xml
index dbcabbb..dd021c6 100644
--- a/Src/RiderPlugin/src/main/resources/META-INF/plugin.xml
+++ b/Src/RiderPlugin/src/main/resources/META-INF/plugin.xml
@@ -6,7 +6,6 @@
Tags: rider c# xml doc xmldoc inspection warning
]]> -