Skip to content

Commit

Permalink
feat(gradle): update IntelliJ platform version and add shire-json lan…
Browse files Browse the repository at this point in the history
…guage support #100

This commit updates the IntelliJ platform version to 243 and the idea version to IU-2024.3 in the gradle-243.properties file. It also adds support for the shire-json language in the build.gradle.kts file. Other changes include enabling Gradle Configuration Cache and Build Cache, and updating the Gradle version to 8.7.
  • Loading branch information
phodal committed Sep 24, 2024
1 parent 493b6e2 commit da4f120
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 4 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

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

39 changes: 37 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fun prop(name: String): String =
extra.properties[name] as? String
?: error("Property `$name` is not defined in gradle.properties")

val ideaPlatformVersion = prop("ideaPlatformVersion")
val platformVersion = prop("ideaPlatformVersion").toInt()
val pluginProjects: List<Project> get() = rootProject.allprojects.toList()
val basePluginArchiveName = "intellij-shire"
val ideaPlugins = listOf(
Expand Down Expand Up @@ -67,7 +67,7 @@ allprojects {
version.set(prop("platformVersion"))
type.set(prop("platformType"))
instrumentCode.set(false)
sandboxDir.set("${layout.projectDirectory}/build/idea-sandbox-$ideaPlatformVersion")
sandboxDir.set("${layout.projectDirectory}/build/idea-sandbox-$platformVersion")
}

idea {
Expand Down Expand Up @@ -113,6 +113,8 @@ project(":core") {
}

dependencies {
implementation(project(":languages:shire-json"))

implementation("com.charleskorn.kaml:kaml:0.61.0")
implementation("org.reflections:reflections:0.10.2")

Expand Down Expand Up @@ -192,6 +194,39 @@ project(":languages:shire-go") {
}
}

project(":languages:shire-json") {
intellij {
version.set(prop("ideaVersion"))
val jsonPlugins = ideaPlugins.toMutableList()
if (platformVersion == 243) {
jsonPlugins += "com.intellij.modules.json"
}
plugins.set(jsonPlugins)
}

dependencies {
}

sourceSets {
main {
resources.srcDirs("src/$platformVersion/main/resources")
}
test {
resources.srcDirs("src/$platformVersion/test/resources")
}
}
kotlin {
sourceSets {
main {
kotlin.srcDirs("src/$platformVersion/main/kotlin")
}
test {
kotlin.srcDirs("src/$platformVersion/test/kotlin")
}
}
}
}

project(":toolsets:git") {
intellij {
version.set(prop("ideaVersion"))
Expand Down
54 changes: 54 additions & 0 deletions gradle-243.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
propertiesPluginEnvironmentNameProperty=platformVersion
ideaPlatformVersion=243
ideaVersion=IU-2024.3

pluginGroup = com.github.phodal.shire
pluginName = shire
pluginRepositoryUrl = https://github.com/phodal/shire
# SemVer format -> https://semver.org
pluginVersion = 0.8.2

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 243
pluginUntilBuild = 243.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IU
platformVersion = 2024.3

# plugin

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins = PythonCore:241.14494.240

goPlugin=org.jetbrains.plugins.go:241.14494.240

nodejsPlugin=NodeJS:241.14494.155

sonarPlugin = org.sonarlint.idea:10.8.1.79205

plantUmlPlugin = PlantUML integration:7.10.1-IJ2023.2

wireMockPlugin=com.intellij.wiremock:241.14494.150

testAutomationPlugin=com.intellij.aqua:241.14494.240

jsonPlugin=com.intellij.modules.json:243.15521.24

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.7

# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false

# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.configuration-cache = true

# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching = true

javaVersion = 17

kotlin.daemon.jvmargs=-Xmx2048m
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
propertiesPluginEnvironmentNameProperty=platformVersion
ideaPlatformVersion=241
ideaVersion=IU-2024.1

pluginGroup = com.github.phodal.shire
pluginName = shire
Expand All @@ -13,8 +16,6 @@ pluginUntilBuild = 243.*
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IU
platformVersion = 2024.1
ideaVersion=IU-2024.1
ideaPlatformVersion=241

# plugin

Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ include(
"languages:shire-kotlin",
"languages:shire-go",
"languages:shire-markdown",
"languages:shire-json",

"toolsets:git",
"toolsets:httpclient",
Expand Down

0 comments on commit da4f120

Please sign in to comment.