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
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CompilerJava {
targetPackage,
fetchContributors
)
.fold(`🍺` => throw new Exception(`🍺`), out => Array(out._1, out._2))
.fold(err => throw new Exception(err), out => Array(out._1, out._2))
}
}

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.13
sbt.version=1.4.7
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ import java.io.PrintStream
import sbt.{`package` => _, _}
import sbt.Keys._
import xsbt.api.Discovery
import java.nio.file.Paths
import cats.{`package` => _}
import cats.data.Ior
import cats.implicits._
import sbt.internal.inc.Analysis
import sbt.internal.inc.{Analysis, MappedVirtualFile}
import sbt.internal.inc.classpath.ClasspathUtilities
import sbtbuildinfo.BuildInfoPlugin
import sbtbuildinfo.BuildInfoPlugin.autoImport._
import xsbti.compile.CompileAnalysis

import scala.jdk.CollectionConverters._

/** The exercise compiler SBT auto plugin */
object ExerciseCompilerPlugin extends AutoPlugin {

Expand Down Expand Up @@ -210,7 +213,16 @@ object ExerciseCompilerPlugin extends AutoPlugin {
.flatMap(analysisIn match {
case analysis: Analysis => analysis.relations.definesClass
})
.map(file => (file.getPath, IO.read(file)))
.map { file =>
(
file.name(),
IO.read(
new File(
(baseDir.getParentFile() +: file.names().tail).mkString("/")
)
)
)
}

captureStdStreams(
fOut = log.info(_: String),
Expand Down
6 changes: 3 additions & 3 deletions sbt-exercise/src/sbt-test/sbt-exercise/basic/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ val pluginVersion = System.getProperty("plugin.version")
lazy val content = (project in file("content"))
.enablePlugins(ExerciseCompilerPlugin)
.settings(
scalaVersion := "2.12.11",
scalaVersion := "2.12.15",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.defaultLocal
Expand All @@ -20,7 +20,7 @@ lazy val content = (project in file("content"))
lazy val contentInPackages = (project in file("contentinpackages"))
.enablePlugins(ExerciseCompilerPlugin)
.settings(
scalaVersion := "2.12.11",
scalaVersion := "2.12.15",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.defaultLocal
Expand All @@ -35,7 +35,7 @@ lazy val contentInPackages = (project in file("contentinpackages"))
lazy val check = (project in file("check"))
.dependsOn(content, contentInPackages)
.settings(
scalaVersion := "2.12.11",
scalaVersion := "2.12.15",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.defaultLocal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ val pluginVersion = System.getProperty("plugin.version")

lazy val root = (project in file("."))
.settings(
scalaVersion := "2.12.11",
scalaVersion := "2.12.15",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.defaultLocal
Expand Down