Skip to content

Commit 5ac5221

Browse files
committed
Print remap classpath to debug log
1 parent 2da738b commit 5ac5221

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/main/kotlin/com/replaymod/gradle/preprocess/PreprocessTask.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import org.gradle.api.tasks.compile.AbstractCompile
1515
import org.jetbrains.kotlin.backend.common.peek
1616
import org.jetbrains.kotlin.backend.common.pop
1717
import org.jetbrains.kotlin.backend.common.push
18+
import org.slf4j.LoggerFactory
1819
import java.io.File
1920
import java.io.Serializable
2021
import java.util.regex.Pattern
@@ -45,6 +46,8 @@ open class PreprocessTask : DefaultTask() {
4546
endif = "##endif",
4647
eval = "#$$"
4748
)
49+
50+
private val LOGGER = LoggerFactory.getLogger(PreprocessTask::class.java)
4851
}
4952

5053
@OutputDirectory
@@ -286,7 +289,15 @@ open class PreprocessTask : DefaultTask() {
286289
LegacyMapping.readMappingSet(mapping.toPath(), reverseMapping)
287290
}
288291
val javaTransformer = Transformer(mappings)
289-
javaTransformer.classpath = classpath.files.filter { it.exists() }.map { it.absolutePath }.toTypedArray()
292+
LOGGER.debug("Remap Classpath:")
293+
javaTransformer.classpath = classpath.files.mapNotNull {
294+
if (it.exists()) {
295+
it.absolutePath.also(LOGGER::debug)
296+
} else {
297+
LOGGER.debug("$it (file does not exist)")
298+
null
299+
}
300+
}.toTypedArray()
290301
val sources = mutableMapOf<String, String>()
291302
project.fileTree(source).forEach { file ->
292303
if (file.name.endsWith(".java")) {

0 commit comments

Comments
 (0)