Skip to content

Commit

Permalink
build: ij-gradle-plugin v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Nov 27, 2024
1 parent 2fb3cc8 commit d512d12
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 85 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/run-ui-tests.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ imgui.ini
/diagram.uml
/src/main/gen/
/.run/
/.intellijPlatform/
34 changes: 13 additions & 21 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.*

fun properties(key: String) = project.findProperty(key).toString()
fun properties(key: String) = providers.gradleProperty(key)
var deps: Properties by rootProject.ext

deps = Properties()
file("gradle/deps.properties").reader().use(deps::load)

val javaVersion = properties("javaVersion").toInt()
val javaVersion = properties("javaVersion").get().toInt()
val ayaVersion = deps.getProperty("version.aya").toString()

plugins {
Expand All @@ -21,7 +21,7 @@ plugins {
// Kotlin support
kotlin("jvm") version "2.1.0"
// https://github.com/JetBrains/gradle-intellij-plugin
id("org.jetbrains.intellij") version "1.17.3"
id("org.jetbrains.intellij.platform") version "2.1.0"
// https://github.com/JetBrains/gradle-changelog-plugin
id("org.jetbrains.changelog") version "2.2.1"
// https://github.com/JetBrains/gradle-grammar-kit-plugin
Expand All @@ -38,16 +38,12 @@ repositories {
if (ayaVersion.endsWith("SNAPSHOT")) {
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
}

// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
type.set(properties("platformType"))
intellijPlatform.defaultRepositories()
}

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
intellijPlatform.pluginConfiguration {
name = properties("pluginName")
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
Expand Down Expand Up @@ -146,7 +142,7 @@ tasks {
}

patchPluginXml {
version.set(project.version.toString())
version = project.version.toString()
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))

Expand Down Expand Up @@ -178,15 +174,6 @@ tasks {
)
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
}

signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
Expand All @@ -195,6 +182,11 @@ tasks {
}

dependencies {
intellijPlatform {
intellijIdeaCommunity("2024.3")
bundledPlugin("com.intellij.java")
}

implementation("org.aya-prover", "producer", ayaVersion) {
exclude("org.aya-prover.upstream", "ij-parsing-core")
exclude("org.aya-prover.upstream", "ij-util-text")
Expand Down
4 changes: 0 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ pluginUntilBuild = 999.*
platformType = IC
platformVersion = LATEST-EAP-SNAPSHOT

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

# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
javaVersion = 21

Expand Down

0 comments on commit d512d12

Please sign in to comment.