Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21

- name: Prepare release name
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validation.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: temurin
java-version: 17
java-version: 21

- uses: gradle/actions/setup-gradle@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ allprojects {
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html#setting-up-intellij-platform
dependencies {
extensions.configure<IntelliJPlatformDependenciesExtension> {
intellijIdeaCommunity("2024.1")
intellijIdeaCommunity("2024.2")
bundledPlugin("org.jetbrains.kotlin")
}
}
Expand Down
5 changes: 5 additions & 0 deletions cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ application {
version = versionName
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

sourceSets {
test {
resources {
Expand Down
8 changes: 7 additions & 1 deletion components/parser/ktfile/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ sourceSets {
}
}

configurations {
implementation {
exclude(group = "org.jetbrains.kotlinx")
}
}

dependencies {
implementation(projects.components.extensions)
implementation(projects.components.irCompose)
implementation(projects.components.psi.imagevector)

implementation(compose.material3)
implementation(compose.ui)
implementation(libs.material.icons.core)

testImplementation(libs.bundles.test)
testRuntimeOnly(libs.junit.launcher)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp
import assertk.assertThat
import assertk.assertions.isEqualTo
import com.intellij.openapi.application.invokeAndWaitIfNeeded
import com.intellij.openapi.project.Project
import com.intellij.testFramework.ProjectExtension
import com.intellij.testFramework.runInEdtAndGet
import io.github.composegears.valkyrie.parser.ktfile.common.ParseType
import io.github.composegears.valkyrie.parser.ktfile.common.createKtFile
import io.github.composegears.valkyrie.parser.ktfile.common.toKtFile
Expand All @@ -27,7 +27,6 @@ import org.junit.jupiter.api.extension.RegisterExtension
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.EnumSource

@Suppress("UnstableApiUsage")
class KtFileToImageVectorParserTest {

companion object {
Expand All @@ -40,7 +39,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `empty image vector`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `empty image vector`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "lazy/EmptyImageVector.kt",
Expand All @@ -62,7 +61,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `empty paths`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `empty paths`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "lazy/EmptyPaths.kt",
Expand All @@ -87,7 +86,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `parse all path params`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `parse all path params`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "lazy/AllPathParams.kt",
Expand Down Expand Up @@ -142,7 +141,7 @@ class KtFileToImageVectorParserTest {
}

@Test
fun `parse material icon`() = invokeAndWaitIfNeeded {
fun `parse material icon`() = runInEdtAndGet {
val ktFile = project.createKtFile(from = "backing/MaterialIcon.kt")
val imageVector = KtFileToImageVectorParser.parse(ktFile)

Expand All @@ -162,7 +161,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `parse icon with group`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `parse icon with group`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "lazy/IconWithGroup.kt",
Expand Down Expand Up @@ -206,7 +205,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `parse icon with linear and radial gradient`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `parse icon with linear and radial gradient`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "lazy/IconWithGradient.kt",
Expand Down Expand Up @@ -277,7 +276,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `parse single path property`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `parse single path property`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "lazy/SinglePath.kt",
Expand Down Expand Up @@ -315,7 +314,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `parse all group params`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `parse all group params`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "imagevector/kt/lazy/AllGroupParams.kt",
Expand Down Expand Up @@ -385,7 +384,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `parse gradient with clip path`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `parse gradient with clip path`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "imagevector/kt//lazy/ClipPathGradient.kt",
Expand Down Expand Up @@ -528,7 +527,7 @@ class KtFileToImageVectorParserTest {

@ParameterizedTest
@EnumSource(value = ParseType::class)
fun `parse compose color`(parseType: ParseType) = invokeAndWaitIfNeeded {
fun `parse compose color`(parseType: ParseType) = runInEdtAndGet {
val ktFile = parseType.toKtFile(
project = project,
pathToLazy = "imagevector/kt/lazy/ComposeColor.kt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import assertk.assertThat
import assertk.assertions.containsExactly
import assertk.assertions.isEqualTo
import assertk.assertions.isNotNull
import com.intellij.openapi.application.invokeAndWaitIfNeeded
import com.intellij.openapi.project.Project
import com.intellij.testFramework.ProjectExtension
import com.intellij.testFramework.runInEdtAndGet
import io.github.composegears.valkyrie.extensions.ResourceUtils.getResourcePath
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension

@Suppress("UnstableApiUsage")
class IconPackPsiParserTest {

companion object {
Expand All @@ -26,7 +25,7 @@ class IconPackPsiParserTest {
fun `simple icon pack parser`() {
val path = getResourcePath("SimpleIconPack.kt")

invokeAndWaitIfNeeded {
runInEdtAndGet {
val iconPackInfo = IconPackPsiParser.extractIconPack(path, project)

assertThat(iconPackInfo).isNotNull().transform { packInfo ->
Expand All @@ -41,7 +40,7 @@ class IconPackPsiParserTest {
fun `nested icon pack parser`() {
val path = getResourcePath("NestedIconPack.kt")

invokeAndWaitIfNeeded {
runInEdtAndGet {
val iconPackInfo = IconPackPsiParser.extractIconPack(path, project)

assertThat(iconPackInfo).isNotNull().transform { packInfo ->
Expand All @@ -57,7 +56,7 @@ class IconPackPsiParserTest {
fun `data object icon pack parser`() {
val path = getResourcePath("DataObjectIconPack.kt")

invokeAndWaitIfNeeded {
runInEdtAndGet {
val iconPackInfo = IconPackPsiParser.extractIconPack(path, project)

assertThat(iconPackInfo).isNotNull().transform { packInfo ->
Expand Down
9 changes: 3 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
[versions]
compose = "1.7.3"
intellij = "2.5.0"
kotlin = "2.1.20"

[libraries]
android-build-tools = "com.android.tools:sdk-common:31.9.2"

highlights = "dev.snipme:highlights:1.0.0"

kotlinpoet = "com.squareup:kotlinpoet:2.1.0"

leviathan = "io.github.composegears:leviathan:2.0.0"
leviathan-compose = "io.github.composegears:leviathan-compose:2.0.0"

material-icons-core = { module = "org.jetbrains.compose.material:material-icons-core", version.ref = "compose" }
tiamat = "io.github.composegears:tiamat:1.5.0"

xpp3 = "org.ogce:xpp3:1.1.6"

clikt = "com.github.ajalt.clikt:clikt:5.0.3"
Expand All @@ -36,7 +33,7 @@ kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", v
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
jetbrains-compose = "org.jetbrains.compose:1.7.3"
jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose" }
jetbrains-intellij = { id = "org.jetbrains.intellij.platform", version.ref = "intellij" }
jetbrains-intellij-module = { id = "org.jetbrains.intellij.platform.module", version.ref = "intellij" }
buildConfig = "com.github.gmazzo.buildconfig:5.6.4"
Expand Down
10 changes: 6 additions & 4 deletions idea-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ intellijPlatform {
buildSearchableOptions = false
projectName = "valkyrie-plugin"
pluginConfiguration.ideaVersion {
sinceBuild = "241"
sinceBuild = "242"
untilBuild = provider { null }
}
pluginVerification {
Expand All @@ -66,7 +66,7 @@ intellijPlatform {
FailureLevel.NOT_DYNAMIC,
)
ides {
ide(IntelliJPlatformType.IntellijIdeaCommunity, "2024.1.6")
ide(IntelliJPlatformType.IntellijIdeaCommunity, "2024.2.4")
ide(IntelliJPlatformType.IntellijIdeaCommunity, "2025.1")
}
}
Expand All @@ -82,8 +82,10 @@ intellijPlatform {
}

java {
// IDEA 2024.1 requires Java 17.
toolchain.languageVersion = JavaLanguageVersion.of(17)
// IDEA 2024.2 or above requires Java 21.
// https://plugins.jetbrains.com/docs/intellij/api-changes-list-2024.html
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks {
Expand Down