Skip to content

Commit

Permalink
Merge pull request #442 from takahirom/takahirom/prepare-for-release-…
Browse files Browse the repository at this point in the history
…of-idea-plugin/2024-07-19

Prepare for release of IntelliJ IDEA plugin
  • Loading branch information
takahirom committed Jul 20, 2024
2 parents cfbb6b8 + 9ac2c2d commit 0faf2e8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ enum class RoborazziTaskType(private val taskName: String) {
}
}

@Deprecated("This API will be removed")
@InternalRoborazziApi
fun getOrderOfTaskName(taskName: String): Int {
return values().indexOfLast { taskName.contains(it.taskName, true) }
}
Expand Down
7 changes: 1 addition & 6 deletions roborazzi-idea-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@ plugins {
}

group = "io.github.takahirom.roborazzi"
version = "1.3.0"
version = "1.4.0"

repositories {
mavenCentral()
}

dependencies {
// Replaced by dependency substitution
implementation("io.github.takahirom.roborazzi:roborazzi-core:0.0.1")
}

// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,19 @@ class RoborazziGradleTask {
).not() && !it.data.name.contains("finalize", true)
}
.map { gradleModuleData.data.id + ":" + it.data.name }
.sortedBy { com.github.takahirom.roborazzi.RoborazziTaskType.getOrderOfTaskName(it) }
.sortedWith(
compareBy({
RoborazziTaskNames.getOrderOfTaskName(it)
}, {
if (it.contains("iOS", true)) {
2
} else if (it.contains("Desktop", true)) {
1
} else {
0
}
})
)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.github.takahirom.roborazzi.idea.preview

enum class RoborazziTaskNames(private val taskName: String) {
None(""),
Record("record"),
Compare("compare"),
Verify("verify"),
VerifyAndRecord("verifyAndRecord"),
CompareAndRecord("compareAndRecord");

companion object {
fun getOrderOfTaskName(taskName: String): Int {
return values().indexOfLast { taskName.contains(it.taskName, true) }
}
}
}

0 comments on commit 0faf2e8

Please sign in to comment.