kobalt icon indicating copy to clipboard operation
kobalt copied to clipboard

Duplicate dependent projects

Open cbeust opened this issue 9 years ago • 0 comments

When sending getDependencies() to a Kobalt server, dependent projects are wrong:

            import com.beust.kobalt.*
            import com.beust.kobalt.api.Project

            val module1 = project {
                name = "module1"
                group = "com.beust"
                artifactId = name
                version = "0.25"
            }

            val module2 = project(module1) {
                name = "module2"
                group = "com.beust"
                artifactId = name
                version = "0.25"
            }

Result for module2's dependencies

http://localhost:1243/v0/getDependencies?buildFile=/Users/beust/t/kobalt/src/Build.kt
dependentProjects":["module1","module1"]

This is happening because both the initCallback() and getDependencyDataFor() run the build file, which adds the dependent projects twice.

cbeust avatar May 02 '16 19:05 cbeust