Conversation
| def sources = (sourceSets.main.java).getFiles().collect({ src -> src.getPath() }).sort() | ||
| def sourcesStr = sources.inject(null, { acc, source -> acc ? acc + " " + source : source }) | ||
|
|
||
| def proc = "etags ${sourcesStr} ".execute() |
There was a problem hiding this comment.
java.io.IOException: Cannot run program "etags": error=2, No such file or directory seems to be an existing issue.
There was a problem hiding this comment.
Does this only happen when this target is run or always? Previously, this target had to be run manually.
wmdietl
left a comment
There was a problem hiding this comment.
Thanks for investigating this! I have a bunch of questions and comments.
Did you manually convert this or is there some IDE/tool support?
The Kotlin version looks a bit more verbose, but if this provides better IDE support, I'm fine with that. Overall, I don't find it much more readable. Do you?
build.gradle
Outdated
| implementation files("${checkerJar}") | ||
| implementation group: 'com.google.errorprone', name: 'javac', version: "$errorproneJavacVersion" | ||
| implementation(files(checkerJar)) | ||
| implementation(group = "com.google.errorprone", name = "javac", version = errorproneJavacVersion) |
There was a problem hiding this comment.
What's the difference between this line and line 52? Not related to the conversion, it just looks odd.
There was a problem hiding this comment.
The javacJar is a configuration that is not only a dependency but also used in other places. I have updated its declaration to improve the syntax and make it more reusable.
build.gradle
Outdated
| val mils = result.endTime - result.startTime | ||
| val seconds = mils / 1000.0 | ||
|
|
||
| logger.info( |
There was a problem hiding this comment.
Before this used println, now it uses logger.info... Is there a difference? Should other prinlns be replaced? Are the loggers configured somewhere?
There was a problem hiding this comment.
According to [Writing your own log messages], it seems println is equivalent to logger.quiet. I have changed it back to println for consistency.
| def sources = (sourceSets.main.java).getFiles().collect({ src -> src.getPath() }).sort() | ||
| def sourcesStr = sources.inject(null, { acc, source -> acc ? acc + " " + source : source }) | ||
|
|
||
| def proc = "etags ${sourcesStr} ".execute() |
There was a problem hiding this comment.
Does this only happen when this target is run or always? Previously, this target had to be run manually.
|
@wmdietl For |
Instead of using Groovy, a dynamically typed language, we should use Kotlin, a statically typed language.
Pros:
Cons: