mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
Switch to IJP 242 EAP (#391)
This in turn requires: 1. Updating the IJP Gradle plugin to 2.0 (beta) 2. Reworking the IDE sample build.gradle.kts in the new 2.0 syntax 3. Bumping the JBR version to 21 4. Removing CodeQL (we're not using it, it's slow, and it won't pick up a JDK 21 no matter how much you want it to) GitOrigin-RevId: 3b99a25f5c963fe1af42baea63fa43def3f85878
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5a8179bd48
commit
b412b503e2
8
platform/jewel/.github/workflows/build.yml
vendored
8
platform/jewel/.github/workflows/build.yml
vendored
@@ -13,10 +13,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 17
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
java-version: 21
|
||||
distribution: zulu
|
||||
cache: gradle
|
||||
|
||||
@@ -32,10 +32,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 17
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
java-version: 21
|
||||
distribution: zulu
|
||||
cache: gradle
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
java-version: 21
|
||||
cache: gradle
|
||||
|
||||
- name: Setup Gradle
|
||||
|
||||
73
platform/jewel/.github/workflows/codeql.yml
vendored
73
platform/jewel/.github/workflows/codeql.yml
vendored
@@ -1,73 +0,0 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main", "*" ]
|
||||
schedule:
|
||||
- cron: '21 15 * * 0'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners
|
||||
# Consider using larger runners for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'java-kotlin' ]
|
||||
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
|
||||
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
# - run: |
|
||||
# echo "Run, Build Application using script"
|
||||
# ./location_of_script_within_repo/buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
2
platform/jewel/.github/workflows/publish.yml
vendored
2
platform/jewel/.github/workflows/publish.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 17
|
||||
java-version: 21
|
||||
cache: gradle
|
||||
|
||||
- name: Setup Gradle
|
||||
|
||||
5
platform/jewel/.gitignore
vendored
5
platform/jewel/.gitignore
vendored
@@ -94,5 +94,10 @@ $RECYCLE.BIN/
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
### Misc
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Ignore IJP temp folder
|
||||
/.intellijPlatform
|
||||
|
||||
@@ -7,6 +7,7 @@ rootProject.name = "buildSrc"
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@ version = when {
|
||||
java {
|
||||
toolchain {
|
||||
vendor = JvmVendorSpec.JETBRAINS
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain {
|
||||
vendor = JvmVendorSpec.JETBRAINS
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
|
||||
target {
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.sun.jna.NativeLong
|
||||
* Could be an address in memory (if pointer to a class or method) or a
|
||||
* value (like 0 or 1)
|
||||
*/
|
||||
@Suppress("OVERRIDE_DEPRECATION") // Copied code
|
||||
internal class ID : NativeLong {
|
||||
constructor()
|
||||
constructor(peer: Long) : super(peer)
|
||||
|
||||
@@ -6,5 +6,7 @@ kotlin.stdlib.default.dependency=false
|
||||
# See https://jb.gg/intellij-platform-kotlin-oom
|
||||
kotlin.incremental.useClasspathSnapshot=false
|
||||
|
||||
ijp.target=241
|
||||
org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false
|
||||
|
||||
ijp.target=242
|
||||
jewel.release.version=0.19.7
|
||||
|
||||
@@ -3,8 +3,8 @@ commonmark = "0.22.0"
|
||||
composeDesktop = "1.7.0-dev1703"
|
||||
detekt = "1.23.6"
|
||||
dokka = "1.9.20"
|
||||
idea = "241.17890.1"
|
||||
ideaGradlePlugin = "1.17.3"
|
||||
idea = "242.19533.56-EAP-SNAPSHOT"
|
||||
ideaPlugin = "2.0.0-beta8"
|
||||
jna = "5.14.0"
|
||||
kotlin = "1.9.24"
|
||||
kotlinSarif = "0.5.0"
|
||||
@@ -24,10 +24,6 @@ kotlinSarif = { module = "io.github.detekt.sarif4k:sarif4k", version.ref = "kotl
|
||||
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
|
||||
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
|
||||
|
||||
ij-platform-ide-core = { module = "com.jetbrains.intellij.platform:ide-core", version.ref = "idea" }
|
||||
ij-platform-ide-impl = { module = "com.jetbrains.intellij.platform:ide-impl", version.ref = "idea" }
|
||||
ij-platform-core-ui = { module = "com.jetbrains.intellij.platform:core-ui", version.ref = "idea" }
|
||||
|
||||
jna-core = { module = "net.java.dev.jna:jna", version.ref = "jna" }
|
||||
|
||||
# Plugin libraries for build-logic's convention plugins to use to resolve the types/tasks coming from these plugins
|
||||
@@ -39,14 +35,12 @@ kotlinter-gradlePlugin = { module = "org.jmailen.gradle:kotlinter-gradle", versi
|
||||
kotlinx-binaryCompatValidator-gradlePlugin = { module = "org.jetbrains.kotlinx:binary-compatibility-validator", version.ref = "kotlinxBinaryCompat" }
|
||||
poko-gradlePlugin = { module = "dev.drewhamilton.poko:poko-gradle-plugin", version.ref = "poko" }
|
||||
|
||||
[bundles]
|
||||
idea = ["ij-platform-ide-core", "ij-platform-ide-impl", "ij-platform-core-ui"]
|
||||
|
||||
[plugins]
|
||||
composeDesktop = { id = "org.jetbrains.compose", version.ref = "composeDesktop" }
|
||||
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
|
||||
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
|
||||
ideaGradlePlugin = { id = "org.jetbrains.intellij", version.ref = "ideaGradlePlugin" }
|
||||
ideaPlugin = { id = "org.jetbrains.intellij.platform", version.ref = "ideaPlugin" }
|
||||
ideaPluginModule = { id = "org.jetbrains.intellij.platform.base", version.ref = "ideaPlugin" }
|
||||
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
kotlinx-binaryCompatValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinxBinaryCompat" }
|
||||
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
|
||||
@@ -4,6 +4,19 @@ plugins {
|
||||
`jewel-check-public-api`
|
||||
`ide-version-checker`
|
||||
alias(libs.plugins.composeDesktop)
|
||||
alias(libs.plugins.ideaPluginModule)
|
||||
}
|
||||
|
||||
// Because we need to define IJP dependencies, the dependencyResolutionManagement
|
||||
// from settings.gradle.kts is overridden and we have to redeclare everything here.
|
||||
repositories {
|
||||
google()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
mavenCentral()
|
||||
|
||||
intellijPlatform {
|
||||
defaultRepositories()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -11,7 +24,9 @@ dependencies {
|
||||
exclude(group = "org.jetbrains.kotlinx")
|
||||
}
|
||||
|
||||
compileOnly(libs.bundles.idea)
|
||||
intellijPlatform {
|
||||
intellijIdeaCommunity(libs.versions.idea)
|
||||
}
|
||||
|
||||
testImplementation(compose.desktop.uiTestJUnit4)
|
||||
testImplementation(compose.desktop.currentOs) {
|
||||
|
||||
@@ -3,13 +3,29 @@ plugins {
|
||||
`jewel-publish`
|
||||
`jewel-check-public-api`
|
||||
alias(libs.plugins.composeDesktop)
|
||||
alias(libs.plugins.ideaPluginModule)
|
||||
}
|
||||
|
||||
// Because we need to define IJP dependencies, the dependencyResolutionManagement
|
||||
// from settings.gradle.kts is overridden and we have to redeclare everything here.
|
||||
repositories {
|
||||
google()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
mavenCentral()
|
||||
|
||||
intellijPlatform {
|
||||
defaultRepositories()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(projects.markdown.core)
|
||||
api(projects.ideLafBridge)
|
||||
compileOnly(projects.markdown.extension.gfmAlerts)
|
||||
compileOnly(libs.bundles.idea)
|
||||
|
||||
intellijPlatform {
|
||||
intellijIdeaCommunity(libs.versions.idea)
|
||||
}
|
||||
|
||||
testImplementation(compose.desktop.uiTestJUnit4)
|
||||
}
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
plugins {
|
||||
jewel
|
||||
alias(libs.plugins.composeDesktop)
|
||||
alias(libs.plugins.ideaGradlePlugin)
|
||||
alias(libs.plugins.ideaPlugin)
|
||||
`android-studio-releases-generator`
|
||||
}
|
||||
|
||||
intellij {
|
||||
pluginName = "Jewel Demo"
|
||||
plugins = listOf("org.jetbrains.kotlin")
|
||||
version = libs.versions.idea.get()
|
||||
}
|
||||
|
||||
// TODO remove this once the IJ Gradle plugin fixes their repositories bug
|
||||
// See https://github.com/JetBrains/gradle-intellij-plugin/issues/776
|
||||
// Because we need to define IJP dependencies, the dependencyResolutionManagement
|
||||
// from settings.gradle.kts is overridden and we have to redeclare everything here.
|
||||
repositories {
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
maven("https://www.jetbrains.com/intellij-repository/releases")
|
||||
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
|
||||
google()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
mavenCentral()
|
||||
|
||||
|
||||
intellijPlatform {
|
||||
defaultRepositories()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
intellijPlatform {
|
||||
intellijIdeaCommunity(libs.versions.idea)
|
||||
instrumentationTools()
|
||||
}
|
||||
|
||||
implementation(projects.ideLafBridge) {
|
||||
exclude(group = "org.jetbrains.kotlinx")
|
||||
}
|
||||
@@ -37,12 +36,12 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
// We don't have any settings in the demo plugin
|
||||
buildSearchableOptions {
|
||||
enabled = false
|
||||
}
|
||||
intellijPlatform {
|
||||
pluginConfiguration { name = "Jewel Demo" }
|
||||
buildSearchableOptions = false
|
||||
}
|
||||
|
||||
tasks {
|
||||
runIde {
|
||||
systemProperties["org.jetbrains.jewel.debug"] = "true"
|
||||
}
|
||||
|
||||
@@ -5,11 +5,10 @@ import com.intellij.ui.components.JBScrollPane
|
||||
import com.intellij.ui.dsl.builder.BottomGap
|
||||
import com.intellij.ui.dsl.builder.Panel
|
||||
import com.intellij.ui.dsl.builder.panel
|
||||
import com.intellij.ui.scale.JBUIScale.scale
|
||||
import com.intellij.ui.util.maximumHeight
|
||||
import com.intellij.util.ImageLoader
|
||||
import com.intellij.util.ui.ComponentWithEmptyText
|
||||
import com.intellij.util.ui.ImageUtil
|
||||
import com.intellij.util.ui.JBDimension
|
||||
import com.intellij.util.ui.JBFont
|
||||
import com.intellij.util.ui.JBUI
|
||||
import com.intellij.util.ui.components.BorderLayoutPanel
|
||||
@@ -49,7 +48,7 @@ private class ItemDetailsPanel(
|
||||
if (bufferedImage != null) {
|
||||
val imageContainer =
|
||||
ImageComponent(scope).apply {
|
||||
maximumHeight = scale(200)
|
||||
maximumSize = JBDimension(Int.MAX_VALUE, 200)
|
||||
image = bufferedImage
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ tasks {
|
||||
// register the task in the afterEvaluate block
|
||||
afterEvaluate {
|
||||
javaLauncher = project.javaToolchains.launcherFor {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
vendor = JvmVendorSpec.JETBRAINS
|
||||
}
|
||||
setExecutable(javaLauncher.map { it.executablePath.asFile.absolutePath }.get())
|
||||
|
||||
@@ -49,6 +49,7 @@ internal fun findViews(packageName: String): List<ViewInfo> {
|
||||
val kFunc = it.kotlinFunction ?: return@mapNotNull null
|
||||
if (kFunc.parameters.isNotEmpty() || kFunc.returnType.classifier != Unit::class) return@mapNotNull null
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
ViewInfo(
|
||||
title = annotation.title,
|
||||
position = annotation.position,
|
||||
|
||||
@@ -6,9 +6,10 @@ rootProject.name = "jewel"
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
@@ -17,9 +18,6 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
maven("https://www.jetbrains.com/intellij-repository/releases")
|
||||
maven("https://www.jetbrains.com/intellij-repository/snapshots")
|
||||
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user