Skip to content

Commit

Permalink
use JJProcessor from jarjar-abrams
Browse files Browse the repository at this point in the history
  • Loading branch information
William Yao wyao@cibotechnologies.com committed May 23, 2024
1 parent db53aeb commit 87f6876
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
7 changes: 3 additions & 4 deletions src/main/scala/coursier/ShadingPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import java.io.File
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.util.zip.ZipFile

import com.eed3si9n.jarjar.Rule
import com.eed3si9n.jarjar.misplaced.MisplacedClassProcessorFactory
import com.eed3si9n.jarjar.util.CoursierJarProcessor
import sbt._
import sbt.Keys._
Expand Down Expand Up @@ -215,9 +215,8 @@ object ShadingPlugin extends AutoPlugin {
val dest = orig.getParentFile / s"${orig.getName.stripSuffix(".jar")}-shading.jar"
if (!dest.exists() || dest.lastModified() < orig.lastModified()) {
import com.eed3si9n.jarjar.JJProcessor
import com.eed3si9n.jarjar.util.StandaloneJarProcessor
val processor = JJProcessor(rules, verbose, false)
CoursierJarProcessor.run((orig +: shadedJars0).toArray, dest, processor.proc, true)
val processor = new JJProcessor(rules, verbose, false, MisplacedClassProcessorFactory.Strategy.FATAL.toString)
CoursierJarProcessor.run((orig +: shadedJars0).toArray, dest, processor, true)
}
def isValid(entry: String): Boolean =
validEntries.contains(entry) ||
Expand Down
33 changes: 0 additions & 33 deletions src/main/scala/org/pantsbuild/jarjar/JJProcessor.scala

This file was deleted.

0 comments on commit 87f6876

Please sign in to comment.