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

chore: make sbt-github-packages plugin optional #213

Merged
merged 1 commit into from
Jan 23, 2024
Merged
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
11 changes: 10 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,16 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.3.0")

// Github Packages
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
if (sys.env.get("GITHUB_TOKEN").isDefined) {
println(s"Adding plugin sbt-dependency-tree since env GITHUB_TOKEN is defined.")
// The reason for this is that the plugin needs the variable to be defined. We don't want to have that requirement.
libraryDependencies += {
val dependency = "com.codecommit" % "sbt-github-packages" % "0.5.3"
val sbtV = (pluginCrossBuild / sbtBinaryVersion).value
val scalaV = (update / scalaBinaryVersion).value
Defaults.sbtPluginExtra(dependency, sbtV, scalaV)
}
} else libraryDependencies ++= Seq[ModuleID]()

// Native Packager
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
Loading