cb372/sbt-explicit-dependencies

Project name in multiple subprojects build

Closed this issue · 3 comments

Thanks for this brilliant plugin. Very much needed. Just a minor thing is that with multiple subprojects in the same build is not easy to understand which one every scan is referring to. Below is the report for this.

sbt:log-effect> undeclaredCompileDependencies
[info] The project explicitly declares all the libraries that it directly depends on for compilation. Good job!
[info] The project explicitly declares all the libraries that it directly depends on for compilation. Good job!
[warn] The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn] "org.log4s" %% "log4s" % "1.6.1"
[warn] The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn] "org.log4s" %% "log4s" % "1.6.1"
[warn] "org.typelevel" %% "cats-core" % "1.3.1"
[success] Total time: 2 s, completed 17-Sep-2018 11:16:49

Is there any way I can label the subproject values so that they appear in the results ? Thanks.

cb372 commented

That’s a good point. It should be pretty easy to include the project name in the log messages.

Do you want to have a go at a PR? You’ll need to get hold of name.value (I’m pretty sure name is the sbt key we want) inside the Def.task block and then pass it to the function that does the logging.

I'm more than happy to give it a try 👍 . Thanks

cb372 commented

Fixed by #4 (thanks!)