Skip to content

Commit

Permalink
update artifactId in LauncherMain (#915)
Browse files Browse the repository at this point in the history
Co-authored-by: eugene yokota <[email protected]>
  • Loading branch information
xuwei-k and eed3si9n authored Oct 8, 2024
1 parent b7a7d0c commit dc25a9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ lazy val gitsupport = (project in file("cli-git"))
),
libraryDependencies ++= scalatest,
run / fork := true,
buildInfoKeys := Seq(name, version, scalaVersion, sbtVersion),
buildInfoKeys := Seq(name, version, scalaVersion, sbtVersion, scalaBinaryVersion),
buildInfoPackage := "giter8"
)

Expand Down
14 changes: 10 additions & 4 deletions launcher/src/main/scala/LauncherMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ class LauncherProcessor extends Processor {
Right("")
}

/** See if there are JARs in ~/.giter8/boot/org.foundweekends.giter8/giter8_2.12/0.10.x. Otherwise, use Coursier to
* download the giter8 artifacts and move them into the boot dir for the next time.
/** See if there are JARs in ~/.giter8/boot/org.foundweekends.giter8/giter8_${scalaBinaryVersion}/${version}.
* Otherwise, use Coursier to download the giter8 artifacts and move them into the boot dir for the next time.
*/
def giter8Artifacts(g8v: String): Seq[File] = {
val launcherVersion = "1.1.3"
val bootHome = Home.home / "boot"
val bootDir = bootHome / "org.foundweekends.giter8" / "giter8_2.12" / g8v
val bootDir = bootHome / "org.foundweekends.giter8" / s"giter8_${giter8.BuildInfo.scalaBinaryVersion}" / g8v
val bootJars =
if (bootDir.exists) bootDir.listFiles.toList filter { _.getName.endsWith(".jar") }
else Nil
Expand All @@ -58,7 +58,13 @@ class LauncherProcessor extends Processor {
import coursier._
val downloadedJars = Fetch()
.addDependencies(
Dependency(Module(Organization("org.foundweekends.giter8"), ModuleName("giter8_2.12")), g8v),
Dependency(
Module(
Organization("org.foundweekends.giter8"),
ModuleName(s"giter8_${giter8.BuildInfo.scalaBinaryVersion}")
),
g8v
),
Dependency(Module(Organization("org.scala-sbt"), ModuleName("launcher")), launcherVersion)
)
.run()
Expand Down

0 comments on commit dc25a9e

Please sign in to comment.