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 artifactId in LauncherMain #915

Merged
merged 2 commits into from
Oct 8, 2024
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
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