Skip to content

Commit

Permalink
fix: compatibility with intellij 243+
Browse files Browse the repository at this point in the history
- Update since build to 243
- Update target to 2024.3.1
- Upgrade gradle intellij platform plugin to v2
- Fix SearchViewModelBase quick filter parameter type change

Signed-off-by: jchrist <[email protected]>
  • Loading branch information
JChrist committed Dec 18, 2024
1 parent 1c658c4 commit bdfcf61
Show file tree
Hide file tree
Showing 27 changed files with 377 additions and 266 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
java-version: 21
# install radicle
- name: Install Radicle
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/qodana-action@v2024.2.6
uses: JetBrains/qodana-action@v2024.3.2

# Upload Qodana report as GitHub code scanning SARIF file
- name: Qodana - Upload Github code scanning report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
java-version: 21
cache: gradle

# Set environment variables
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
java-version: 21
- name: Setup FFmpeg
if: ${{matrix.os == 'ubuntu-latest'}}
uses: FedericoCarboni/setup-ffmpeg@v3
Expand All @@ -108,6 +108,9 @@ jobs:
- name: Setup FFmpeg mac
if: ${{matrix.os == 'macos-latest'}}
run: brew install ffmpeg
- name: env
run: |
echo "JDK_JAVA_OPTIONS='--add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens java.xml/javax.xml.transform=ALL-UNNAMED'" >> $GITHUB_ENV
- name: Clean
working-directory: ${{ github.workspace }}/radicle-jetbrains-plugin
run: ./gradlew :clean
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/plugin_verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
cache: gradle
java-version: 21

# Set environment variables
- name: Export Properties
Expand All @@ -47,8 +46,6 @@ jobs:
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v4
Expand All @@ -58,7 +55,7 @@ jobs:

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
java-version: 21
- name: Install Radicle
env:
RAD_HOME: ${{ github.workspace }}/.radicle
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
java-version: 21
- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v3
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: env
run: |
echo "JDK_JAVA_OPTIONS='--add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens java.xml/javax.xml.transform=ALL-UNNAMED'" >> $GITHUB_ENV
- name: Clean
run: ./gradlew :clean
- name: Run Idea
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
build
video
/out/
.intellijPlatform/
103 changes: 64 additions & 39 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
// Java support
id("java")
checkstyle
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
alias(libs.plugins.gradleIntelliJPlugin) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
}

Expand All @@ -21,19 +21,34 @@ repositories {
maven {
url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies")
}
intellijPlatform {
defaultRepositories()
}
}

var remoteRobotVersion: String = libs.versions.remoteRobot.get();

Check warning on line 29 in build.gradle.kts

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Redundant semicolon

Redundant semicolon
dependencies {
testImplementation("com.intellij.remoterobot:remote-robot:$remoteRobotVersion")
testImplementation("com.intellij.remoterobot:remote-fixtures:$remoteRobotVersion")
intellijPlatform {
//intellijIdeaCommunity('LATEST-EAP-SNAPSHOT')
intellijIdeaCommunity(properties("platformVersion").get())
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
bundledPlugins(providers.gradleProperty("platformPlugins").map { it.split(',').map { it2 -> it2.trim()} })
testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform)
}
//https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-faq.html#missing-opentest4j-dependency-in-test-framework
//testImplementation("junit:junit:4.13.2")
//testImplementation("org.opentest4j:opentest4j:1.3.0")

testImplementation("org.junit.jupiter:junit-jupiter-api:${libs.versions.junitJupiter.get()}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${libs.versions.junitJupiter.get()}")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${libs.versions.junitJupiter.get()}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${libs.versions.junitPlatformLauncher.get()}")
testImplementation("org.junit.jupiter:junit-jupiter-engine:${libs.versions.junitJupiter.get()}")
testImplementation("org.junit.vintage:junit-vintage-engine:${libs.versions.junitJupiter.get()}")
testImplementation("org.junit.platform:junit-platform-launcher:${libs.versions.junitPlatformLauncher.get()}")

testImplementation("org.assertj:assertj-core:${libs.versions.assertj.get()}")

testImplementation("com.intellij.remoterobot:remote-robot:$remoteRobotVersion")
testImplementation("com.intellij.remoterobot:remote-fixtures:$remoteRobotVersion")

// Logging Network Calls
testImplementation("com.squareup.okhttp3:logging-interceptor:${libs.versions.loggingInterceptor.get()}")
testImplementation("org.mockito:mockito-core:${libs.versions.mockito.get()}")
Expand All @@ -53,14 +68,24 @@ checkstyle {
maxWarnings = 0;

Check warning on line 68 in build.gradle.kts

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Redundant semicolon

Redundant semicolon
}

// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
intellij {
pluginName = properties("pluginName")
version = properties("platformVersion")
type = properties("platformType")
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html
intellijPlatform {
pluginConfiguration {
name = properties("pluginName")
}

pluginConfiguration {
ideaVersion {
sinceBuild = properties("pluginSinceBuild")
untilBuild = provider { null } // properties("pluginUntilBuild")
}
}

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins = properties("platformPlugins").map { it.split(',').map(String::trim).filter(String::isNotEmpty) }
pluginVerification {
ides {
recommended()
}
}
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
Expand All @@ -86,7 +111,7 @@ tasks {
patchPluginXml {
version = properties("pluginVersion")
sinceBuild = properties("pluginSinceBuild")
untilBuild = properties("pluginUntilBuild")
untilBuild = provider { null } // properties("pluginUntilBuild")

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
Expand Down Expand Up @@ -114,33 +139,10 @@ tasks {
}
}

downloadRobotServerPlugin {
version = remoteRobotVersion
}

runIde {
systemProperty("idea.is.internal", "true");

Check warning on line 143 in build.gradle.kts

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Redundant semicolon

Redundant semicolon
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
// In case your Idea is launched on remote machine you can enable public port and enable encryption of JS calls
// systemProperty "robot-server.host.public", "true"
// systemProperty "robot.encryption.enabled", "true"
// systemProperty "robot.encryption.password", "my super secret"

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")
systemProperty("ide.mac.file.chooser.native", "false")
systemProperty("apple.laf.useScreenMenuBar", "false")
systemProperty("jbScreenMenuBar.enabled", "false")
systemProperty("idea.trust.all.projects", "true")
systemProperty("ide.show.tips.on.startup.default.value", "false")
}

test {
// enable here nad in runIdeForUiTests block - to log the retrofit HTTP calls
// systemProperty "debug-retrofit", "enable"
Expand Down Expand Up @@ -168,14 +170,37 @@ tasks {
}

val uiTestTask = tasks.register<Test>("uiTest") {
useJUnitPlatform()
//useJUnitPlatform()
testLogging { exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL }
environment(mapOf("RADICLE_REPO" to System.getenv("RADICLE_REPO")))
include("network/radicle/jetbrains/radiclejetbrainsplugin/remoterobot/ui/**")
}

val runIdeForUiTests by intellijPlatformTesting.runIde.registering {
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",
"-Dide.mac.file.chooser.native=false",
"-Dapple.laf.useScreenMenuBar=false",
"-DjbScreenMenuBar.enabled=false",
"-Didea.trust.all.projects=true",
"-Dide.show.tips.on.startup.default.value=false",
)
}
}

plugins {
robotServerPlugin()
}
}


val e2eTestTask = tasks.register<Test>("endToEndTests") {
useJUnitPlatform()
//useJUnitPlatform()
testLogging { exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL }
environment(mapOf("RADICLE_REPO" to System.getenv("RADICLE_REPO")))
include("network/radicle/jetbrains/radiclejetbrainsplugin/remoterobot/e2e/**")
Expand Down
17 changes: 9 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,34 @@
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup = network.radicle.jetbrains
pluginName = radicle-jetbrains-plugin
pluginName = Radicle
pluginRepositoryUrl = https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z3WHS4GSf8hChLjGYfPkJY7vCxsBK
# SemVer format -> https://semver.org
pluginVersion = 0.12.0
pluginVersion = 0.13.0

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 232
pluginSinceBuild = 243
#TODO FIX THIS LATER
pluginUntilBuild=

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IC
platformVersion = 2023.3.5
platformVersion = 2024.3
#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=Git4Idea, org.intellij.plugins.markdown
platformPlugins=Git4Idea,org.intellij.plugins.markdown

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

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

# Opt-out flag for bundling Kotlin standard library.
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
Expand Down
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[versions]
# plugins
gradleIntelliJPlugin = "2.2.1"
changelog = "2.2.1"

# libraries
annotations = "26.0.1"
jacksonJsr310 = "2.18.0"
jacksonJsr310 = "2.18.2"
tika = "3.0.0"
sshTools = "3.1.2"

Expand All @@ -14,13 +18,9 @@ mockito = "5.14.2"
remoteRobot = "0.11.23"
checkstyleTools = "10.18.2"

# plugins
changelog = "2.2.1"
gradleIntelliJPlugin = "1.17.4"

[libraries]
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }

[plugins]
gradleIntelliJPlugin = { id = "org.jetbrains.intellij.platform", version.ref = "gradleIntelliJPlugin" }
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading

0 comments on commit bdfcf61

Please sign in to comment.