question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add first-class support for included/composite builds

See original GitHub issue

Right now, included builds are treated like regular projects, which means their versions are separate from the the project that includes them.

While this is great when you want to keep the projects decoupled, it’d be great to also have the option to share the setup, the versions.properties file, and have runs of the refreshVersion task also refresh the versions from all included builds that opt-in to this behavior.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:49
  • Comments:9

github_iconTop GitHub Comments

2reactions
NikkyAIcommented, Jun 6, 2021

dirty experiment to see if refreshVersions can automatically set up task dependencies on refreshVersions in included builds

gradle.rootProject {
    afterEvaluate {
        val task = gradle.includedBuilds.firstOrNull()?.task(":refreshVersionsDDDDsjdfhdsiuf")!!
        logger.lifecycle("task: $task")
        val ourTask = tasks.create("doStuffYouKnow")
        val dependsOn = ourTask.dependsOn
        ourTask.dependsOn(task)
        try {
            ourTask.taskDependencies.getDependencies(ourTask)
        } catch (e: Exception) {
            ourTask.setDependsOn(dependsOn)
            System.err.println("our marvellous task is not there ;) :P :D :D :D")
        }
    }
}
0reactions
LouisCADcommented, Jun 7, 2021

I don’t see how the version entry usage comments would be removed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Composing builds - Gradle User Manual
A build that is included in a composite build is referred to, naturally enough, as an "included build". Included builds do not share...
Read more >
How to use Composite builds as a replacement of buildSrc in ...
To inform Gradle of the new module that is included, we add the following into settings.gradle : The first line is added for...
Read more >
Webinar: Composite Builds with Gradle and IntelliJ IDEA
Composite Builds is a feature introduced in Gradle 3.1 to provide a way to decompose large multi-project builds into smaller, more isolated ...
Read more >
Webinar Recording: Composite Builds with Gradle and IntelliJ ...
Support for composite builds was first introduced in IntelliJ IDEA 2016.3, with this you had the ability to add additional Gradle builds to ......
Read more >
Composite, included build, dependency substitution to project ...
Included builds are for substituting binary dependencies. Something that you could also publish to a repository and use from there instead. So ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found