Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19870

Does the lifecycle of a build differ when called by buildship to import a project?

$
0
0

I have seen a similar problem in another piece of code, in simplified form I have some code which did

gradle.projectsEvaluated {
    if (project.extensions.myextension.somevalue.get() == 'foo') {
        project.dependencies.add('testImplementation', 'some:dependency:1.2.3')
    }
}

works fine in intellij and gradle, buildship fails with

Cannot change dependencies of configuration ':testImplementation' after it has been included in dependency resolution.

changing my code to fire in project.afterEvaluate is required to make it work.

IMV this is a bug (because buildship is behaving fundamentally differently to gradle itself)


Viewing all articles
Browse latest Browse all 19870

Trending Articles