Skip to content

Commit

Permalink
[GH] Fix ModifyClassesTask.kt
Browse files Browse the repository at this point in the history
This is an imported pull request from #41.

Resolves #41
Github-Pr-Head-Sha: 93bc749
GitOrigin-RevId: 70ba9cc
Change-Id: I6b0378faebb24624b053d197c8a41107217f8405
  • Loading branch information
porum authored and jdochez committed Feb 29, 2024
1 parent 85c0db5 commit 84834c6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ abstract class ModifyClassesTask: DefaultTask() {

private fun JarOutputStream.writeEntity(relativePath: String, byteArray: ByteArray) {
// check for duplication name first
if (jarPaths.contains(path)) {
if (jarPaths.contains(relativePath)) {
printDuplicatedMessage(relativePath)
} else {
putNextEntry(JarEntry(relativePath))
Expand All @@ -137,4 +137,4 @@ abstract class ModifyClassesTask: DefaultTask() {

private fun printDuplicatedMessage(name: String) =
println("Cannot add ${name}, because output Jar already has file with the same name.")
}
}

0 comments on commit 84834c6

Please sign in to comment.