-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[monogame]: Migrate to IJ Platform Plugin 2.0, also migrate RD
- Loading branch information
Showing
6 changed files
with
150 additions
and
87 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Build artifacts | ||
/.intellijPlatform/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
build | ||
|
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 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,19 +1,63 @@ | ||
import com.jetbrains.rd.generator.gradle.RdGenTask | ||
|
||
plugins { | ||
id("java") | ||
id("com.jetbrains.rdgen") | ||
id("org.jetbrains.kotlin.jvm") | ||
} | ||
|
||
val rdLibDirectory: () -> File by rootProject.extra | ||
|
||
repositories { | ||
maven { setUrl("https://cache-redirector.jetbrains.com/maven-central") } | ||
flatDir { | ||
dir(rdLibDirectory()) | ||
maven("https://cache-redirector.jetbrains.com/intellij-dependencies") | ||
maven("https://cache-redirector.jetbrains.com/maven-central") | ||
} | ||
|
||
val repoRoot: File = projectDir.parentFile | ||
|
||
sourceSets { | ||
main { | ||
kotlin { | ||
srcDir(repoRoot.resolve("protocol/src/main/kotlin/model")) | ||
} | ||
} | ||
} | ||
|
||
rdgen { | ||
verbose = true | ||
packages = "model" | ||
|
||
generator { | ||
language = "kotlin" | ||
transform = "asis" | ||
root = "com.jetbrains.rider.model.nova.ide.IdeRoot" | ||
namespace = "com.jetbrains.rider.plugins.efcore.model" | ||
directory = file("$projectDir/src/rider/main/kotlin/me/seclerp/rider/plugins/monogame/rd").absolutePath | ||
} | ||
|
||
generator { | ||
language = "csharp" | ||
transform = "reversed" | ||
root = "com.jetbrains.rider.model.nova.ide.IdeRoot" | ||
namespace = "Rider.Plugins.EfCore" | ||
directory = file("$projectDir/src/dotnet/Rider.Plugins.MonoGame/Rd").absolutePath | ||
} | ||
} | ||
|
||
tasks.withType<RdGenTask> { | ||
dependsOn(sourceSets["main"].runtimeClasspath) | ||
classpath(sourceSets["main"].runtimeClasspath) | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib") | ||
implementation(group = "", name = "rd-gen") | ||
implementation(group = "", name = "rider-model") | ||
val rdVersion: String by project | ||
val rdKotlinVersion: String by project | ||
|
||
implementation("com.jetbrains.rd:rd-gen:$rdVersion") | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib:$rdKotlinVersion") | ||
implementation( | ||
project( | ||
mapOf( | ||
"path" to ":", | ||
"configuration" to "riderModel" | ||
) | ||
) | ||
) | ||
} |
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,12 +1,39 @@ | ||
rootProject.name = "rider-monogame" | ||
|
||
pluginManagement { | ||
val rdVersion: String by settings | ||
val rdKotlinVersion: String by settings | ||
val intellijPlatformGradlePluginVersion: String by settings | ||
val gradleJvmWrapperVersion: String by settings | ||
|
||
repositories { | ||
maven("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") | ||
maven("https://cache-redirector.jetbrains.com/intellij-dependencies") | ||
maven("https://cache-redirector.jetbrains.com/plugins.gradle.org") | ||
maven("https://oss.sonatype.org/content/repositories/snapshots/") | ||
gradlePluginPortal() | ||
maven("https://cache-redirector.jetbrains.com/maven-central") | ||
|
||
if (rdVersion == "SNAPSHOT") { | ||
mavenLocal() | ||
} | ||
} | ||
} | ||
|
||
rootProject.name = "rider-monogame" | ||
plugins { | ||
id("com.jetbrains.rdgen") version rdVersion | ||
id("org.jetbrains.kotlin.jvm") version rdKotlinVersion | ||
id("org.jetbrains.intellij.platform") version intellijPlatformGradlePluginVersion | ||
id("me.filippov.gradle.jvm.wrapper") version gradleJvmWrapperVersion | ||
} | ||
|
||
resolutionStrategy { | ||
eachPlugin { | ||
when (requested.id.name) { | ||
// This required to correctly rd-gen plugin resolution. | ||
// Maybe we should switch our naming to match Gradle plugin naming convention. | ||
"rdgen" -> { | ||
useModule("com.jetbrains.rd:rd-gen:${rdVersion}") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
include("protocol") | ||
include(":protocol") |
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