GithubHelp home page GithubHelp logo

Comments (4)

tiainen avatar tiainen commented on August 16, 2024

I have applied the plugin in a multi-project setup and it ran fine without any issues. This makes me think that the issue is not specifically related to multi-project structures.

This issue arises because some code triggered the declared dependencies to be resolved. Once that is done, you can no longer change the project dependencies, resulting in the error you mention. Can you provide a project that reproduces the error? I'm not sure yet if the proposed solution is the best one.

from javafx-gradle-plugin.

lenborje avatar lenborje commented on August 16, 2024

The failure depends on the order of project dependencies.

Let’s assume you have two projects, A and B, where B depends on A.

It will fail if A uses the plugin.
It runs OK if B (and only B) uses the plugin.

I can provide a minimal example on Monday.

from javafx-gradle-plugin.

lenborje avatar lenborje commented on August 16, 2024

OK, you're right. I've trimmed down my own project to a minimum where the problem is triggered, and that is actually not a multi-project.

It is triggered by anything referring to the configurations property.

Steps to reproduce:

  1. Check out the HelloFX sample repo https://github.com/openjfx/samples.git.
  2. Go to the samples/HelloFX/Gradle/hellofx directory.
  3. Add the following line to build.gradle:

System.out.println(configurations.runtime.collect{it.name})

Gradle will now fail, e.g.:

$ ./gradlew run
Parallel execution is an incubating feature.

> Configure project :
[]

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'hellofx'.
> Cannot change dependencies of configuration ':compile' after it has been included in dependency resolution.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s

Switching to my fork (version 0.0.6-SNAPSHOT) will restore expected behaviour.

from javafx-gradle-plugin.

tiainen avatar tiainen commented on August 16, 2024

Fixed with #15.

from javafx-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.