Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update intellij platform to 223 #28

Merged
merged 2 commits into from
Dec 1, 2022
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
13 changes: 4 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "com.github.monosoul"

plugins {
id("org.jetbrains.intellij") version "1.10.0"
id("org.jetbrains.intellij") version "1.11.0-SNAPSHOT"
kotlin("jvm") version "1.7.22"
id("org.jetbrains.kotlinx.kover") version "0.6.1"
}
Expand All @@ -19,11 +19,11 @@ kover {
}

intellij {
version.set("222.3345.118")
version.set("223.7571.182")
pluginName.set("Git extended update-index")
updateSinceUntilBuild.set(true)
sameSinceUntilBuild.set(false)
plugins.set(listOf("git4idea"))
plugins.set(listOf("vcs-git"))
}

dependencies {
Expand All @@ -33,12 +33,7 @@ dependencies {
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.platform:junit-platform-launcher")
testImplementation("io.strikt:strikt-jvm:0.34.1")
testImplementation("io.mockk:mockk-jvm") {
version {
strictly("1.13.1")
because("versions higher than 1.13.1 cause failures")
}
}
testImplementation("io.mockk:mockk-jvm:1.13.3")
testImplementation("org.apache.commons:commons-lang3:3.12.0")
}

Expand Down
9 changes: 8 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
rootProject.name = "git-extended-update-index-plugin"
rootProject.name = "git-extended-update-index-plugin"

pluginManagement {
repositories {
maven("https://oss.sonatype.org/content/repositories/snapshots/")
gradlePluginPortal()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal class UpdateIndexLineHandlerFactoryTest {
private lateinit var vcsManager: ProjectLevelVcsManager

@MockK
private lateinit var gitExecutable: GitExecutable
private lateinit var gitExecutable: GitExecutable.Local

@MockK(relaxed = true)
private lateinit var virtualFileManager: VirtualFileManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.util.Disposer.dispose
import com.intellij.openapi.vcs.FilePath
import com.intellij.openapi.vcs.LocalFilePath
import com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode
import com.intellij.openapi.vcs.changes.ui.ChangesViewModelBuilder
import com.intellij.openapi.vcs.changes.ui.NoneChangesGroupingFactory
import com.intellij.openapi.vcs.changes.ui.TreeModelBuilder
import com.intellij.openapi.vfs.LocalFileSystem
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileManager
import io.mockk.Called
import io.mockk.every
Expand Down Expand Up @@ -127,14 +129,19 @@ internal class SkippedWorktreeChangesViewModifierTest {
get { root }.isNotNull()
get { getChildCount(root) } isEqualTo 1
get { getChild(root, 0) }.isA<ChangesBrowserSkippedWorktreeNode>() and {
get { allFilesUnder }
.hasSize(files.size)
get { listAllFiles() }.hasSize(files.size)
.map { it.path }
.containsExactlyInAnyOrder(files.map { "/${it.path}" })
}
}
}

private fun ChangesBrowserSkippedWorktreeNode.listAllFiles() = traverse()
.filter(ChangesBrowserNode<*>::isLeaf)
.map(ChangesBrowserNode<*>::getUserObject)
.filter(VirtualFile::class.java)
.toList()

private class FilesArgumentSource : AbstractMultiArgumentsSource({
List<FilePath>(Random.nextInt(1..10)) {
LocalFilePath(RandomStringUtils.randomAlphabetic(LIMIT), false)
Expand Down