-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94921be
commit e0c68bb
Showing
5 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
COURSIER_REPOSITORIES="ivy2Local|central|ivy:https://a.b.com/artifactory/snapshots/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
scalaVersion := "2.12.7" | ||
|
||
TaskKey[Unit]("check") := { | ||
val expectedRepositories: Seq[String] = Seq( | ||
// Repository.central() | ||
"https://repo1.maven.org/maven2", | ||
//Repository.ivy2Local() | ||
".ivy2/local/", | ||
"https://oss.sonatype.org/content/repositories/public", | ||
"https://oss.sonatype.org/content/repositories/snapshots", | ||
// custom repository | ||
"https://a.b.com/artifactory/snapshots" | ||
) | ||
|
||
// scalafixResolvers is lazily evaluated as a stream of coursier.internal.api.ApiHelper.ApiRepo's. To fully evaluate | ||
// the stream and overcome object equality issues, build a string from scalafixResolvers. | ||
var scalafixRepos: String = "" | ||
scalafixResolvers.in(ThisBuild).value.foreach { repo => | ||
scalafixRepos += repo.toString | ||
} | ||
|
||
expectedRepositories.foreach { repository => | ||
if (!scalafixRepos.contains(repository)) { | ||
throw new Exception( | ||
s"repository=$repository not included in scalafixResolvers" | ||
) | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/sbt-test/sbt-scalafix/scalafixResolvers/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
resolvers += Resolver.sonatypeRepo("public") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % sys.props("plugin.version")) | ||
addSbtPlugin("au.com.onegeek" %% "sbt-dotenv" % "2.1.146") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# reload to ensure env variable COURSIER_REPOSITORIES is picked up by scalafixResolvers | ||
> reload | ||
> check |