Skip to content

Commit

Permalink
Move main branch to target IJP 243
Browse files Browse the repository at this point in the history
This includes:
 * Bumping IJP platform to 243
 * Targeting theme gen to 243.12818.47
 * Bumping to Kotlin 2.0
 * Switching to the new Compose Compiler Gradle plugin
 * Bumping Poko, KotlinPoet, kotlinx-serialization
 * Bumping kotlinx-binary-compatibility-validator
 * Pre-emptively bumping Jewel to 0.25.0
  • Loading branch information
rock3r authored and jakub-senohrabek committed Oct 14, 2024
1 parent 0c0973b commit ae7eed1
Show file tree
Hide file tree
Showing 24 changed files with 83 additions and 97 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ $RECYCLE.BIN/

# Ignore release patch generator output
/this-release.txt

# Ignore Kotlin compiler sessions
/.kotlin
/buildSrc/.kotlin
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,11 @@ and the branch on which the corresponding bridge code lives:

| IntelliJ Platform version(s) | Branch to use |
|------------------------------|-------------------------|
| 2024.2 (beta 1+) | `main` |
| 2024.3 (EAP 1+) | `main` |
| 2024.2 (beta 1+) | `releases/242` |
| 2024.1 (EAP 3+) | `releases/241` |
| 2023.3 | `releases/233` |
| 2023.2 (**deprecated**) | `archived-releases/232` |
| 2023.3 (**archived**) | `archived-releases/233` |
| 2023.2 (**archived**) | `archived-releases/232` |
| 2023.1 or older | **Not supported** |

For an example on how to set up an IntelliJ Plugin, you can refer to
Expand Down
17 changes: 9 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import java.io.ByteArrayOutputStream

plugins {
alias(libs.plugins.composeDesktop) apply false
alias(libs.plugins.composeMultiplatform) apply false
alias(libs.plugins.composeCompiler) apply false
`jewel-linting`
}

Expand All @@ -22,13 +23,13 @@ dependencies {
}

tasks {
// val mergeSarifReports by
// registering(MergeSarifTask::class) {
// source(configurations.outgoingSarif)
// include { it.file.extension == "sarif" }
// }
//
// register("check") { dependsOn(mergeSarifReports) }
// val mergeSarifReports by
// registering(MergeSarifTask::class) {
// source(configurations.outgoingSarif)
// include { it.file.extension == "sarif" }
// }
//
// register("check") { dependsOn(mergeSarifReports) }

register("tagRelease") {
description = "Tags main branch and releases branches with provided tag name"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/jewel-check-public-api.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apiValidation {
nonPublicMarkers.add("org.jetbrains.jewel.InternalJewelApi")
}

poko { pokoAnnotation = "org.jetbrains.jewel.foundation.GenerateDataFunctions" }
poko { pokoAnnotation = "org/jetbrains/jewel/foundation/GenerateDataFunctions" }

kotlin { explicitApi() }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package org.jetbrains.jewel.buildlogic.demodata

import com.squareup.kotlinpoet.ClassName
import gradle.kotlin.dsl.accessors._34fcf23848cfa0f534eebf6913e08a53.kotlin
import gradle.kotlin.dsl.accessors._34fcf23848cfa0f534eebf6913e08a53.sourceSets
import java.io.File
import java.net.URI
import gradle.kotlin.dsl.accessors._327d2b3378ed6d2c1bec5d20438f90c7.kotlin
import gradle.kotlin.dsl.accessors._327d2b3378ed6d2c1bec5d20438f90c7.sourceSets
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.decodeFromStream
import org.gradle.api.DefaultTask
Expand All @@ -21,6 +19,8 @@ import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.property
import org.gradle.kotlin.dsl.setProperty
import java.io.File
import java.net.URI

open class StudioVersionsGenerationExtension(project: Project) {

Expand Down
3 changes: 2 additions & 1 deletion decorated-window/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

private val composeVersion
Expand Down
4 changes: 3 additions & 1 deletion foundation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

private val composeVersion
get() = ComposeBuildConfig.composeVersion

dependencies {
api("org.jetbrains.compose.foundation:foundation-desktop:$composeVersion")
api("org.jetbrains.compose.components:components-resources:$composeVersion")

testImplementation(compose.desktop.uiTestJUnit4)
testImplementation(compose.desktop.currentOs) { exclude(group = "org.jetbrains.compose.material") }
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ kotlin.incremental.useClasspathSnapshot=false
org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false

jdk.level=17
ijp.target=242
ijp.target=243
jewel.release.version=0.25.0
13 changes: 7 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ idea = "2024.2.3"
intelliJPlatformBuild = "242.23339.11"
ideaPlugin = "2.1.0"
jna = "5.14.0"
kotlin = "1.9.24"
kotlin = "2.0.10"
kotlinSarif = "0.5.0"
kotlinpoet = "1.17.0"
kotlinpoet = "1.18.1"
kotlinterGradlePlugin = "4.4.1"
kotlinxSerialization = "1.6.3"
kotlinxBinaryCompat = "0.14.0"
kotlinxSerialization = "1.7.2"
kotlinxBinaryCompat = "0.16.3"
ktfmtGradlePlugin = "0.20.1"
poko = "0.15.3"
poko = "0.16.0"

[libraries]
commonmark-core = { module = "org.commonmark:commonmark", version.ref = "commonmark" }
Expand Down Expand Up @@ -42,7 +42,8 @@ ktfmt-gradlePlugin = { module = "com.ncorti.ktfmt.gradle:plugin", version.ref =
poko-gradlePlugin = { module = "dev.drewhamilton.poko:poko-gradle-plugin", version.ref = "poko" }

[plugins]
composeDesktop = { id = "org.jetbrains.compose", version.ref = "composeDesktop" }
composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" }
composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
ideaPlugin = { id = "org.jetbrains.intellij.platform", version.ref = "ideaPlugin" }
Expand Down
3 changes: 2 additions & 1 deletion ide-laf-bridge-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ plugins {
`jewel-publish`
`jewel-check-public-api`
`ide-version-checker`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.ideaPluginModule)
}

Expand Down
3 changes: 2 additions & 1 deletion ide-laf-bridge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ plugins {
`jewel-publish`
`jewel-check-public-api`
`ide-version-checker`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.ideaPluginBase)
}

Expand Down
3 changes: 2 additions & 1 deletion int-ui/int-ui-decorated-window/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

dependencies {
Expand Down
5 changes: 3 additions & 2 deletions int-ui/int-ui-standalone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
`intellij-theme-generator`
}

dependencies { api(projects.ui) }

intelliJThemeGenerator {
val targetIdeaVersion = "idea/242.20224.91"
val targetIdeaVersion = "idea/243.12818.47"
register("intUiLight") {
themeClassName = "org.jetbrains.jewel.intui.core.theme.IntUiLightTheme"
themeFile = "platform/platform-resources/src/themes/expUI/expUI_light.theme.json"
Expand Down
3 changes: 2 additions & 1 deletion markdown/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion markdown/extension/autolink/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion markdown/extension/gfm-alerts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion markdown/ide-laf-bridge-styling/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.ideaPluginBase)
}

Expand Down
3 changes: 2 additions & 1 deletion markdown/int-ui-standalone-styling/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ plugins {
jewel
`jewel-publish`
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion samples/ide-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
jewel
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.ideaPlugin)
`android-studio-releases-generator`
}
Expand Down
3 changes: 2 additions & 1 deletion samples/standalone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
jewel
alias(libs.plugins.composeDesktop)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package org.jetbrains.jewel.samples.standalone

import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.input.key.Key
import androidx.compose.ui.input.key.KeyEvent
Expand All @@ -8,6 +15,7 @@ import androidx.compose.ui.input.key.isAltPressed
import androidx.compose.ui.input.key.key
import androidx.compose.ui.input.key.type
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.application
import org.jetbrains.compose.resources.ExperimentalResourceApi
import org.jetbrains.compose.resources.decodeToSvgPainter
Expand Down Expand Up @@ -119,3 +127,9 @@ private fun svgResource(resourcePath: String): Painter =
.decodeToSvgPainter(Density(1f))

private object ResourceLoader

@Preview
@Composable
fun MyThing() {
Box(Modifier.background(Color.Red).size(50.dp))
}
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,11 @@ and the branch on which the corresponding bridge code lives:
| IntelliJ Platform version(s) | Branch to use |
|------------------------------|-------------------------|
| 2024.2 (beta 1+) | `main` |
| 2024.3 (EAP 1+) | `main` |
| 2024.2 (beta 1+) | `releases/242` |
| 2024.1 (EAP 3+) | `releases/241` |
| 2023.3 | `releases/233` |
| 2023.2 (**deprecated**) | `archived-releases/232` |
| 2023.3 (**archived**) | `archived-releases/233` |
| 2023.2 (**archived**) | `archived-releases/232` |
| 2023.1 or older | **Not supported** |
For an example on how to set up an IntelliJ Plugin, you can refer to
Expand Down
Loading

0 comments on commit ae7eed1

Please sign in to comment.