Skip to content

Commit

Permalink
Move LibaryMigration to sbt-plugin and use sbt resolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Aug 5, 2024
1 parent 3532cbc commit 61efc7c
Show file tree
Hide file tree
Showing 16 changed files with 170 additions and 307 deletions.
2 changes: 1 addition & 1 deletion .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ OrganizeImports {

RemoveUnused {
imports = false // handled by OrganizeImports
}
}
22 changes: 12 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,19 @@ lazy val `sbt-plugin` = project
.settings(
scalaVersion := V.scala212,
name := "sbt-scala3-migrate",
libraryDependencies ++= Seq(
"io.get-coursier" %% "coursier" % V.coursierApi,
"org.scalatest" %% "scalatest" % V.scalatest % Test
),
scriptedLaunchOpts ++= Seq(s"-Dplugin.version=${version.value}"),
scriptedDependencies := {
scriptedDependencies
.dependsOn(
`migrate-interface` / publishLocal,
`compiler-interface` / publishLocal,
migrate / publishLocal,
`scalafix-rules` / publishLocal
)
.value
},
scriptedDependencies := scriptedDependencies
.dependsOn(
`migrate-interface` / publishLocal,
`compiler-interface` / publishLocal,
migrate / publishLocal,
`scalafix-rules` / publishLocal
)
.value,
buildInfoPackage := "migrate",
scriptedBufferLog := false,
buildInfoKeys := Seq[BuildInfoKey](
Expand Down
12 changes: 0 additions & 12 deletions interfaces/migrate/src/main/java/migrate/interfaces/Lib.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ void migrate(List<Path> unmanagedSources,
Path baseDirectory);

MigratedScalacOptions migrateScalacOption(List<String> scala3CompilerOptions);
MigratedLibs migrateLibs(List<Lib> libs, List<String> repositories);

void migrateSyntax(List<Path> unmanagedSources,
Path targetRoot,
Expand Down

This file was deleted.

This file was deleted.

100 changes: 0 additions & 100 deletions migrate/src/main/scala/migrate/LibraryMigration.scala

This file was deleted.

9 changes: 0 additions & 9 deletions migrate/src/main/scala/migrate/interfaces/MigrateImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ import java.{util => jutil}

import scala.jdk.CollectionConverters._

import migrate.LibraryMigration
import migrate.Scala3Migrate
import migrate.ScalacOptionsMigration
import migrate.internal.AbsolutePath
import migrate.internal.Classpath
import migrate.internal.InitialLib
import migrate.internal.Repository
import migrate.utils.ScalaExtensions._
import migrate.utils.ScalafixService

Expand Down Expand Up @@ -59,12 +56,6 @@ final class MigrateImpl(logger: Logger) extends Migrate {
override def migrateScalacOption(scalacOptions: jutil.List[String]): MigratedScalacOptions =
ScalacOptionsMigration.migrate(scalacOptions.asScala.toSeq)

override def migrateLibs(libs: jutil.List[Lib], repositories: jutil.List[String]): MigratedLibs = {
val initialLibs = libs.asScala.map(InitialLib.apply).toSeq
val initialRepos = repositories.asScala.map(Repository).toSeq
LibraryMigration.migrateLibs(initialLibs, initialRepos)
}

override def migrateSyntax(
unmanagedSources: jutil.List[Path],
targetRoot: Path,
Expand Down
38 changes: 0 additions & 38 deletions migrate/src/main/scala/migrate/internal/CrossVersion.scala

This file was deleted.

24 changes: 0 additions & 24 deletions plugin/src/main/scala/migrate/LibImpl.scala

This file was deleted.

Loading

0 comments on commit 61efc7c

Please sign in to comment.