-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Renzu generating for Ant, Kobalt and Maven #894
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment and good to go. Thanks for the fix.
val filesInDir = currentDirectory.list() | ||
|
||
//Am I being to smart? Basically we want to check if there is an element that is in both fileNames and filesInDir | ||
return if ((fileNames - filesInDir).isNotEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
insersect would be readable, and then you can remove the comment.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/intersect.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
fun recurseFilesUpwards(fileName: String, currentDirectory: File): File = | ||
if (currentDirectory.list().contains(fileName)) { | ||
fun recurseFilesUpwards(fileNames: Set<String>, currentDirectory: File): File { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tailrec? Looks like tailrec to me.
@@ -90,10 +90,13 @@ class RenzuGenerator( | |||
} | |||
|
|||
fun generate() { | |||
|
|||
val topLevelFiles = setOf("settings.gradle", "pom.xml", "build.xml", "Build.kt") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add build.gradle.kt
too? It's the Gradle API for Kotlin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add settings.gradle.kt - build.gradle.kt can be in submodule.
* Fix Renzu generating for Ant, Kobalt and Maven * PR comments * Fix build * Add settings.gradle.kt
Fixes #889