Skip to content
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

Merged
merged 9 commits into from
Jul 1, 2018
Merged

Fix Renzu generating for Ant, Kobalt and Maven #894

merged 9 commits into from
Jul 1, 2018

Conversation

andrzejressel
Copy link
Contributor

Fixes #889

Copy link
Member

@JorgeCastilloPrz JorgeCastilloPrz left a 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()) {
Copy link
Member

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

Copy link
Member

@JorgeCastilloPrz JorgeCastilloPrz left a 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 {
Copy link
Member

@pakoito pakoito Jun 17, 2018

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")
Copy link
Member

@pakoito pakoito Jun 17, 2018

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.

Copy link
Contributor Author

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.

@pakoito pakoito merged commit 6995651 into arrow-kt:master Jul 1, 2018
RawToast pushed a commit to RawToast/kategory that referenced this pull request Jul 18, 2018
* Fix Renzu generating for Ant, Kobalt and Maven

* PR comments

* Fix build

* Add settings.gradle.kt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants