From 78eb0860a29266b8903de10b4308b0c7183af83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Sur=C3=A9e?= Date: Wed, 6 Nov 2024 15:05:35 +0100 Subject: [PATCH] Remove unused code --- .../sbtlicensereport/SbtLicenseReport.scala | 1 - .../license/LicenseReport.scala | 22 ++----------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/main/scala/sbtlicensereport/SbtLicenseReport.scala b/src/main/scala/sbtlicensereport/SbtLicenseReport.scala index 56c205f..be01b49 100644 --- a/src/main/scala/sbtlicensereport/SbtLicenseReport.scala +++ b/src/main/scala/sbtlicensereport/SbtLicenseReport.scala @@ -1,7 +1,6 @@ package sbtlicensereport import sbt._ -import sbt.librarymanagement.ivy.IvyDependencyResolution import Keys._ import license._ diff --git a/src/main/scala/sbtlicensereport/license/LicenseReport.scala b/src/main/scala/sbtlicensereport/license/LicenseReport.scala index 74fffa5..ca7716c 100644 --- a/src/main/scala/sbtlicensereport/license/LicenseReport.scala +++ b/src/main/scala/sbtlicensereport/license/LicenseReport.scala @@ -3,13 +3,6 @@ package license import sbt._ import sbt.io.Using -import sbt.internal.librarymanagement.IvySbt -import sbt.librarymanagement.{ - DependencyResolution, - UnresolvedWarning, - UnresolvedWarningConfiguration, - UpdateConfiguration -} case class DepModuleInfo(organization: String, name: String, version: String) { override def toString = s"${organization} # ${name} # ${version}" @@ -186,8 +179,8 @@ object LicenseReport { private def getLicenses( report: UpdateReport, - configs: Set[String] = Set.empty, - categories: Seq[LicenseCategory] = LicenseCategory.all, + configs: Set[String], + categories: Seq[LicenseCategory], originatingModule: DepModuleInfo ): Seq[DepLicense] = { for { @@ -216,15 +209,4 @@ object LicenseReport { // TODO - Filter for a real report... LicenseReport(licenses, report) } - - private def resolve( - depRes: DependencyResolution, - module: IvySbt#Module, - log: Logger - ): Either[UnresolvedWarning, UpdateReport] = { - val uc = UpdateConfiguration().withLogging(UpdateLogging.Quiet) - val uwc = UnresolvedWarningConfiguration() - - depRes.update(module, uc, uwc, log) - } }