-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support Mill 0.11.0-M1 Drop support for 0.9.7 (minimum version is now 0.9.12) * Support Mill 0.11.0-M1 * Use system links for common files * Test with Mill 0.10.10 * Avoid directory system link
- Loading branch information
Showing
11 changed files
with
100 additions
and
26 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
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
mill-mima/src-mill0.10/com/github/lolgab/mill/mima/VersionSpecific.scala
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,20 @@ | ||
package com.github.lolgab.mill.mima | ||
|
||
import com.github.lolgab.mill.mima.worker.MimaBuildInfo | ||
import mill._ | ||
import mill.scalalib._ | ||
|
||
private[mima] trait VersionSpecific extends CoursierModule { | ||
private[mima] def mimaWorkerClasspath: T[Agg[PathRef]] = T { | ||
Lib | ||
.resolveDependencies( | ||
repositoriesTask(), | ||
resolveCoursierDependency().apply(_), | ||
Agg( | ||
ivy"com.github.lolgab:mill-mima-worker-impl_2.13:${MimaBuildInfo.publishVersion}" | ||
.exclude("com.github.lolgab" -> "mill-mima-worker-api_2.13") | ||
), | ||
ctx = Some(T.log) | ||
) | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
mill-mima/src-mill0.11/com/github/lolgab/mill/mima/ExtraCoursierSupport.scala
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,47 @@ | ||
package com.github.lolgab.mill.mima | ||
|
||
import mill.Agg | ||
import mill.PathRef | ||
import mill.T | ||
import mill.api.Result | ||
import mill.define.Task | ||
import mill.scalalib._ | ||
|
||
import scala.util.chaining._ | ||
|
||
private[mima] trait ExtraCoursierSupport | ||
extends CoursierModule | ||
with ScalaModule { | ||
|
||
/** Resolves each dependency independently. | ||
* | ||
* @param deps | ||
* The dependencies to resolve. | ||
* @param sources | ||
* If `true`, resolved the source jars instead of the binary jars. | ||
* @return | ||
* Tuples containing each dependencies and it's resolved transitive | ||
* artifacts. | ||
*/ | ||
protected def resolveSeparateNonTransitiveDeps( | ||
deps: Task[Agg[Dep]] | ||
): Task[Agg[(Dep, Agg[PathRef])]] = T.task { | ||
val pRepositories = repositoriesTask() | ||
val pDeps = deps() | ||
val scalaV = scalaVersion() | ||
pDeps.map { dep => | ||
val Result.Success(resolved) = Lib.resolveDependencies( | ||
repositories = pRepositories, | ||
deps = Agg(dep).map(dep => | ||
Lib | ||
.depToBoundDep(dep, scalaV) | ||
.tap(dependency => | ||
dependency.copy(dep = dependency.dep.withTransitive(false)) | ||
) | ||
), | ||
ctx = Some(implicitly[mill.api.Ctx.Log]) | ||
) | ||
(dep, resolved) | ||
} | ||
} | ||
} |
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 @@ | ||
../../../../../../src-mill0.10/com/github/lolgab/mill/mima/Mima.scala |
19 changes: 19 additions & 0 deletions
19
mill-mima/src-mill0.11/com/github/lolgab/mill/mima/VersionSpecific.scala
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,19 @@ | ||
package com.github.lolgab.mill.mima | ||
|
||
import com.github.lolgab.mill.mima.worker.MimaBuildInfo | ||
import mill._ | ||
import mill.scalalib._ | ||
|
||
private[mima] trait VersionSpecific extends CoursierModule { | ||
private[mima] def mimaWorkerClasspath: T[Agg[PathRef]] = T { | ||
Lib | ||
.resolveDependencies( | ||
repositoriesTask(), | ||
Agg( | ||
ivy"com.github.lolgab:mill-mima-worker-impl_2.13:${MimaBuildInfo.publishVersion}" | ||
.exclude("com.github.lolgab" -> "mill-mima-worker-api_2.13") | ||
).map(Lib.depToBoundDep(_, BuildInfo.scalaVersion)), | ||
ctx = Some(T.log) | ||
) | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
mill-mima/src-mill0.11/com/github/lolgab/mill/mima/internal/Utils.scala
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 @@ | ||
../../../../../../../src-mill0.10/com/github/lolgab/mill/mima/internal/Utils.scala |
1 change: 1 addition & 0 deletions
1
mill-mima/src-mill0.9/com/github/lolgab/mill/mima/ExtraCoursierSupport.scala
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 @@ | ||
../../.././../../../src-mill0.10/com/github/lolgab/mill/mima/ExtraCoursierSupport.scala |
1 change: 1 addition & 0 deletions
1
mill-mima/src-mill0.9/com/github/lolgab/mill/mima/VersionSpecific.scala
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 @@ | ||
../../.././../../../src-mill0.10/com/github/lolgab/mill/mima/VersionSpecific.scala |
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