Compilation failure on Java 8
asarkar opened this issue · 0 comments
asarkar commented
> Task :compileKotlin FAILED
e: /Volumes/Workspace/build-time-tracker/src/main/kotlin/org/asarkar/gradle/TimingRecorder.kt: (26, 69): Cannot access 'toSeconds': it is private in 'Duration'
e: /Volumes/Workspace/build-time-tracker/src/main/kotlin/org/asarkar/gradle/TimingRecorder.kt: (27, 25): Type mismatch: inferred type is Long but BigDecimal! was expected
e: /Volumes/Workspace/build-time-tracker/src/main/kotlin/org/asarkar/gradle/TimingRecorder.kt: (28, 31): Type inference failed. Expected type mismatch: inferred type is Pair<String, BigDecimal!> but Pair<String, Long> was expected
e: /Volumes/Workspace/build-time-tracker/src/main/kotlin/org/asarkar/gradle/TimingRecorder.kt: (39, 41): Cannot access 'toSeconds': it is private in 'Duration'
e: /Volumes/Workspace/build-time-tracker/src/main/kotlin/org/asarkar/gradle/TimingRecorder.kt: (43, 75): Cannot access 'toSeconds': it is private in 'Duration'
e: /Volumes/Workspace/build-time-tracker/src/main/kotlin/org/asarkar/gradle/TimingRecorder.kt: (48, 37): Type mismatch: inferred type is BigDecimal! but Long was expected
> Task :compileTestKotlin FAILED
e: /Volumes/Workspace/build-time-tracker/src/test/kotlin/org/asarkar/gradle/BuildTimeTrackerPluginFunctionalTest.kt: (67, 23): Unresolved reference: readString
The this SO question; Duration.toSeconds
is basically the same as Duration.getSeconds
and was added in Java 9 to avoid confusion.
Files.readString
came in Java 11.