Skip to content

Commit

Permalink
Support for 2023.3 Beta 2
Browse files Browse the repository at this point in the history
  • Loading branch information
hmemcpy committed Nov 19, 2023
1 parent 47f1733 commit 27dcf69
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import org.jetbrains.sbtidea.{AutoJbr, JbrPlatform}

lazy val scala213 = "2.13.10"
lazy val scalaPluginVersion = "2023.3.3"
lazy val pluginVersion = "2023.3.27" + sys.env.get("ZIO_INTELLIJ_BUILD_NUMBER").fold(".0")(v => s".$v")
lazy val scalaPluginVersion = "2023.3.13"
lazy val pluginVersion = "2023.3.28" + sys.env.get("ZIO_INTELLIJ_BUILD_NUMBER").fold(".0")(v => s".$v")

ThisBuild / intellijPluginName := "zio-intellij"
ThisBuild / intellijBuild := "233"
ThisBuild / intellijBuild := "233.11799.30"
ThisBuild / jbrInfo := AutoJbr(explicitPlatform = Some(JbrPlatform.osx_aarch64))

Global / intellijAttachSources := true
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<change-notes>replaced-by-build</change-notes>

<idea-version since-build="233" until-build="233.*"/>
<idea-version since-build="233.11799" until-build="233.*"/>

<depends>org.intellij.scala</depends>
<depends>com.intellij.modules.java</depends>
Expand Down
8 changes: 5 additions & 3 deletions src/main/scala/zio/intellij/project/ZioProjectBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package zio.intellij.project
import com.intellij.ide.util.projectWizard.{ModuleWizardStep, SettingsStep}
import com.intellij.openapi.module.{ModifiableModuleModel, Module}
import com.intellij.openapi.options.ConfigurationException
import com.intellij.openapi.progress.EmptyProgressIndicator
import com.intellij.openapi.projectRoots.{JavaSdk, JavaSdkVersion, Sdk}
import com.intellij.openapi.util.io
import com.intellij.openapi.util.text.Strings
Expand All @@ -15,7 +16,7 @@ import org.jetbrains.plugins.scala.extensions._
import org.jetbrains.plugins.scala.project.template.ScalaVersionDownloadingDialog
import org.jetbrains.plugins.scala.project.{ScalaLanguageLevel, Version, Versions}
import org.jetbrains.plugins.scala.util.HttpDownloadUtil
import org.jetbrains.plugins.scala.{extensions, ScalaBundle, ScalaVersion}
import org.jetbrains.plugins.scala.{ScalaBundle, ScalaVersion, extensions}
import org.jetbrains.sbt.project.template.{SComboBox, SbtModuleBuilderBase, ScalaSettingsStepBase}
import org.jetbrains.sbt.{Sbt, SbtBundle}
import zio.intellij.ZioIcon
Expand Down Expand Up @@ -46,8 +47,9 @@ private[zio] class ZioProjectBuilder extends SbtModuleBuilderBase {

val hardcodedZioVersions = Versions(ZIO.`latest-ish`.toString, List("1.0.11", "1.0.10", "1.0.9"))

private lazy val scalaVersions = ScalaKind.loadVersionsWithProgress()
private lazy val sbtVersions = SbtKind.loadVersionsWithProgress()
private lazy val indicator = new EmptyProgressIndicator
private lazy val scalaVersions = ScalaKind.loadVersionsWithProgress(indicator)
private lazy val sbtVersions = SbtKind.loadVersionsWithProgress(indicator)
private lazy val zioVersions = (for {
versionStr <- selections.scalaVersion
version <- ScalaVersion.fromString(versionStr)
Expand Down
10 changes: 9 additions & 1 deletion src/test/scala/intellij/testfixtures/IvyManagedLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,16 @@ object IvyManagedLoader {
] = mutable.Map()

def apply(dependencies: DependencyDescription*): IvyManagedLoader =
new IvyManagedLoader(new TestDependencyManager, dependencies: _*)
new IvyManagedLoader(TestDependencyManager, dependencies: _*)

def apply(dependencyManager: DependencyManagerBase, dependencies: DependencyDescription*): IvyManagedLoader =
new IvyManagedLoader(dependencyManager, dependencies: _*)
}

object TestDependencyManager extends DependencyManagerBase {

// from Michael M.: this blacklist is in order that tested libraries do not transitively fetch `scala-library`,
// which is loaded in a special way in tests via org.jetbrains.plugins.scala.base.libraryLoaders.ScalaSDKLoader
//TODO: should we add scala3-* here?
override val artifactBlackList: Set[String] = Set("scala-library", "scala-reflect", "scala-compiler")
}

0 comments on commit 27dcf69

Please sign in to comment.