Skip to content

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielThomas committed Jul 26, 2017
1 parent 990a2ef commit 4810f66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class JavaCrossCompilePlugin : Plugin<Project> {
}

private fun JavaVersion.locate(): JavaLocation {
logger.debug("Locating JDK for $this")
val jdkHome = providers
.map { it.provide(this) }
.firstOrNull() ?: throw cannotLocate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DefaultLocationJDKPathProvider : JDKPathProvider {

listOf("oracle", "openjdk").forEach { variant ->
val jdkHome = candidates.firstOrNull {
logger.debug("No candidates were found in search locations $basePaths")
logger.debug("Evaluating Ubuntu candidate ${it.name}")
it.name.startsWith("java-${javaVersion.majorVersion}-$variant")
}
if (jdkHome != null) {
Expand All @@ -41,6 +41,7 @@ class DefaultLocationJDKPathProvider : JDKPathProvider {
}

val jdkHome = candidates.firstOrNull {
logger.debug("Evaluating macOS/Windows candidate ${it.name}")
val version = "1.${javaVersion.majorVersion}.0"
it.name.startsWith("jdk1.$version.0") || it.name.startsWith("$version.jdk")
}
Expand Down

0 comments on commit 4810f66

Please sign in to comment.