fun parse()

in src/main/kotlin/io/bazel/kotlin/builder/tasks/jvm/JdepsParser.kt [93:113]


    fun parse(
      label: String,
      jarFile: String,
      classPath: MutableList<String>,
      lines: List<String>,
      isImplicit: Predicate<String>
    ): Deps.Dependencies {
      val filename = Paths.get(jarFile).fileName.toString()
      val jdepsParser = JdepsParser(isImplicit)

      classPath.forEach { x -> jdepsParser.consumeJarLine(x, Deps.Dependency.Kind.UNUSED) }
      lines.forEach { jdepsParser.processLine(it) }
      jdepsParser.markFromEntry(filename, Deps.Dependency.Kind.EXPLICIT)

      val rootBuilder = Deps.Dependencies.newBuilder()
      rootBuilder.success = false
      rootBuilder.ruleLabel = label
      jdepsParser.depMap.values.forEach { b -> rootBuilder.addDependency(b.build()) }
      rootBuilder.success = true
      return rootBuilder.build()
    }