Source dependency 2-step generation needed for non-Gradle projects

(Mike Kobit) #1

I recently saw the blog post. The idea of using source dependencies is awesome. I’m looking forward to the ability to use other dependency types more natively from Gradle, especially when trying to combine polyglot projects.

One issue I see now from the example at is the 2-step approach needed to first generate the repositories, and then the build setup from settings.gradle seems to kick in. Wouldn’t it be better if the generateRepos step wasn’t needed?

For example, in Bazel this is modeled using the new_* category of methods to declare dependencies and then also allow for the “enclosing” build to declare the build script for the dependency type. For example, from :

    name = "my_ssl",
    remote = "",
    tag = "v1.0.2",
    build_file_content = """
    name = "openssl-lib",
    srcs = ["src/"],
    hdrs = ["src/openssl.h"],

(Stefan Oehme) #2

You misunderstood the sample - They all live in the same repository, so in order to demonstrate cross-repo dependencies we need to generate a mock repository. If your projects actually are in the same repo, you’d simply use a normal composite build instead of source dependencies.