-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gradle updates for new intelliJ platform version
- Loading branch information
1 parent
7191036
commit 567ccb9
Showing
12 changed files
with
223 additions
and
83 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 @@ | ||
2025-02-07 |
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,79 +1,152 @@ | ||
import org.jetbrains.changelog.Changelog; | ||
import org.jetbrains.changelog.markdownToHTML | ||
import org.jetbrains.intellij.platform.gradle.TestFrameworkType | ||
|
||
plugins { | ||
id("java") | ||
id("org.jetbrains.kotlin.jvm") version "1.7.10" | ||
id("org.jetbrains.intellij") version "1.8.0" | ||
id("org.jetbrains.changelog") version "1.3.1" | ||
alias(libs.plugins.kotlin) | ||
alias(libs.plugins.intelliJPlatform) | ||
alias(libs.plugins.changelog) | ||
alias(libs.plugins.qodana) | ||
alias(libs.plugins.kover) | ||
} | ||
|
||
group = "ca.rightsomegoodgames" | ||
version = "1.1.0" | ||
group = providers.gradleProperty("pluginGroup").get() | ||
version = providers.gradleProperty("pluginVersion").get() | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
kotlin { | ||
jvmToolchain { | ||
languageVersion.set(JavaLanguageVersion.of(11)) | ||
intellijPlatform { | ||
defaultRepositories() | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.0") | ||
} | ||
testImplementation(libs.junit) | ||
|
||
// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin | ||
intellij { | ||
version.set("2022.2") | ||
type.set("IC") // Target IDE Platform | ||
intellijPlatform { | ||
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion")) | ||
|
||
plugins.set(listOf(/* Plugin Dependencies */)) | ||
} | ||
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins. | ||
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') }) | ||
|
||
tasks { | ||
// Set the JVM compatibility versions | ||
withType<JavaCompile> { | ||
sourceCompatibility = "11" | ||
targetCompatibility = "11" | ||
} | ||
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { | ||
kotlinOptions.jvmTarget = "11" | ||
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace. | ||
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') }) | ||
|
||
instrumentationTools() | ||
pluginVerifier() | ||
zipSigner() | ||
testFramework(TestFrameworkType.Platform) | ||
} | ||
} | ||
|
||
patchPluginXml { | ||
sinceBuild.set("221.1") | ||
untilBuild.set("") | ||
intellijPlatform { | ||
pluginConfiguration { | ||
version = providers.gradleProperty("pluginVersion") | ||
|
||
pluginDescription.set( | ||
projectDir.resolve("README.md").readText().lines().run { | ||
val start = "<!-- Plugin description -->" | ||
val end = "<!-- Plugin description end -->" | ||
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest | ||
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map { | ||
val start = "<!-- Plugin description -->" | ||
val end = "<!-- Plugin description end -->" | ||
|
||
with(it.lines()) { | ||
if (!containsAll(listOf(start, end))) { | ||
throw GradleException("Plugin description section not found in README.md\n$start ... $end") | ||
throw GradleException("Plugin description section not found in README.md:\n$start ... $end") | ||
} | ||
subList(indexOf(start) + 1, indexOf(end)) | ||
}.joinToString("\n").let { markdownToHTML(it) } | ||
) | ||
|
||
changeNotes.set(provider { | ||
changelog.run { | ||
getOrNull(version.get()) ?: getLatest() | ||
}.toHTML() | ||
}) | ||
subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML) | ||
} | ||
} | ||
|
||
val changelog = project.changelog // local variable for configuration cache compatibility | ||
// Get the latest available change notes from the changelog file | ||
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion -> | ||
with(changelog) { | ||
renderItem( | ||
(getOrNull(pluginVersion) ?: getUnreleased()) | ||
.withHeader(false) | ||
.withEmptySections(false), | ||
Changelog.OutputType.HTML, | ||
) | ||
} | ||
} | ||
|
||
ideaVersion { | ||
sinceBuild = providers.gradleProperty("pluginSinceBuild") | ||
untilBuild = providers.gradleProperty("pluginUntilBuild") | ||
} | ||
} | ||
|
||
signing { | ||
certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN") | ||
privateKey = providers.environmentVariable("PRIVATE_KEY") | ||
password = providers.environmentVariable("PRIVATE_KEY_PASSWORD") | ||
} | ||
|
||
signPlugin { | ||
certificateChain.set(System.getenv("IDEA_CERTIFICATE_CHAIN")) | ||
privateKey.set(System.getenv("IDEA_PRIVATE_KEY")) | ||
password.set(System.getenv("IDEA_PRIVATE_KEY_PASSWORD")) | ||
publishing { | ||
token = providers.environmentVariable("PUBLISH_TOKEN") | ||
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 | ||
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: | ||
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel | ||
channels = providers.gradleProperty("pluginVersion") | ||
.map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) } | ||
} | ||
|
||
pluginVerification { | ||
ides { | ||
recommended() | ||
} | ||
} | ||
} | ||
|
||
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin | ||
changelog { | ||
groups.empty() | ||
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl") | ||
} | ||
|
||
// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration | ||
kover { | ||
reports { | ||
total { | ||
xml { | ||
onCheck = true | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
wrapper { | ||
gradleVersion = providers.gradleProperty("gradleVersion").get() | ||
} | ||
|
||
publishPlugin { | ||
dependsOn("patchChangelog") | ||
token.set(System.getenv("IDEA_PUBLISH_TOKEN")) | ||
channels.set(listOf((version as String).split("-").getOrElse(1) { "default" }.split('.').first())) | ||
dependsOn(patchChangelog) | ||
} | ||
} | ||
|
||
intellijPlatformTesting { | ||
runIde { | ||
register("runIdeForUiTests") { | ||
task { | ||
jvmArgumentProviders += CommandLineArgumentProvider { | ||
listOf( | ||
"-Drobot-server.port=8082", | ||
"-Dide.mac.message.dialogs.as.sheets=false", | ||
"-Djb.privacy.policy.text=<!--999.999-->", | ||
"-Djb.consents.confirmation.enabled=false", | ||
) | ||
} | ||
} | ||
|
||
plugins { | ||
robotServerPlugin() | ||
} | ||
} | ||
} | ||
} |
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,21 @@ | ||
pluginGroup = ca.rightsomegoodgames | ||
pluginName = GoldenRatio | ||
pluginRepositoryUrl = https://github.com/cmcpasserby/Golden-Ratio | ||
pluginVersion = 1.3.0 | ||
|
||
pluginSinceBuild = 233 | ||
|
||
platformType = IC | ||
platformVersion = 2024.3.2 | ||
|
||
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html | ||
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP | ||
platformPlugins = | ||
# Example: platformBundledPlugins = com.intellij.java | ||
platformBundledPlugins = | ||
|
||
gradleVersion = 8.10.2 | ||
|
||
kotlin.stdlib.default.dependency = false | ||
org.gradle.configuration-cache = true | ||
org.gradle.caching = true |
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,20 @@ | ||
[versions] | ||
# libraries | ||
junit = "4.13.2" | ||
|
||
# plugins | ||
changelog = "2.2.1" | ||
intelliJPlatform = "2.1.0" | ||
kotlin = "1.9.25" | ||
kover = "0.8.3" | ||
qodana = "2024.2.3" | ||
|
||
[libraries] | ||
junit = { group = "junit", name = "junit", version.ref = "junit" } | ||
|
||
[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" } | ||
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } | ||
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" } |
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,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.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
Oops, something went wrong.