-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Gradle and to new (Kotlin based) 2.0 `org.jetbrains.intellij.p…
…latform` plugin
- Loading branch information
Showing
12 changed files
with
152 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,7 @@ | |
# custom ignores | ||
|
||
/Build/Output/ | ||
|
||
.intellijPlatform | ||
|
||
/Src/InspectCodeTest/RSAT*/* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(), "<br />\n") | ||
"<b>$versionTitle</b>$versionText" | ||
}.take(10).joinToString() | ||
} | ||
|
||
tasks.prepareSandbox { | ||
from("${rootDir}/../${ResharperPluginProjectName}/bin/${ReSharperVersionIdentifier}/${BuildConfiguration}") { | ||
include("${ResharperPluginProjectName}*") | ||
into("${rootProject.name}/dotnet") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
RiderPluginProjectName=rider-Roflcopter | ||
|
||
ResharperPluginProjectName=Roflcopter.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |