Skip to content

Commit

Permalink
refactor: ensure everything works with all 0.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ckipp01 committed Aug 11, 2022
1 parent 0c8d84b commit 22f4527
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The main benifits of doing this are:

## Requirements

- Right now this plugin requires **at least Mill 0.10.3**.
- Right now this plugin only supports the **Mill 0.10.x series**.
- Make sure in your repo settings the Dependency Graph feature is enabled as
well as Dependabot Alerts if you'd like them. (Settings -> Code security and
analysis)
Expand Down
3 changes: 1 addition & 2 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import mill.scalalib.api.Util.scalaNativeBinaryVersion
import de.tobiasroeser.mill.integrationtest._
import de.tobiasroeser.mill.vcs.version.VcsVersion

// TODO Should probably drop this to 0.10.0, but when I did a bunch of stuff breaks
val millVersion = "0.10.3"
val millVersion = "0.10.0"
val scala213 = "2.13.8"
val artifactBase = "mill-github-dependency-graph"

Expand Down
13 changes: 2 additions & 11 deletions plugin/src/io/kipp/mill/github/dependency/graph/Resolver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import mill.eval.Evaluator
import mill.scalalib.Dep
import mill.scalalib.JavaModule
import mill.scalalib.Lib
import mill.scalalib.internal.ModuleUtils

/** Utils to help find all your modules and resolve their dependencies.
*/
Expand All @@ -33,7 +32,6 @@ object Resolver {
val repos = javaModule.repositoriesTask()
val mapDeps = javaModule.mapDependencies()
val custom = javaModule.resolutionCustomizer()
val cacheCustom = javaModule.coursierCacheCustomizer()

val (dependencies, resolution) =
Lib.resolveDependenciesMetadata(
Expand All @@ -42,7 +40,6 @@ object Resolver {
deps = deps,
mapDependencies = Some(mapDeps),
customizer = custom,
coursierCacheCustomizer = cacheCustom,
ctx = Some(T.log)
)

Expand All @@ -57,12 +54,6 @@ object Resolver {
}
}

/** Quick and dirty, give me all the JavaModules.
*/
private[graph] def computeModules(ev: Evaluator): Seq[JavaModule] = {
ModuleUtils
.transitiveModules(ev.rootModule)
.collect { case jm: JavaModule => jm }
}

private[graph] def computeModules(ev: Evaluator) =
ev.rootModule.millInternal.modules.collect { case j: JavaModule => j }
}

0 comments on commit 22f4527

Please sign in to comment.