You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just how special :app is not clear from the documentation.
Process to reproduce.
clone the project's git repository
git mv app foo
./gradlew build -> see error below
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':bespin:compileJava'.
> Could not resolve all dependencies for configuration ':bespin:compileClasspath'.
> Project with path ':app' could not be found in project ':bespin'.
This may be the intended behavior but it was not what I expected.
The documentation around :app including dependencies should get some attention.
My specific issue was that I created an application with a different name.
It was unable to resolve any dependencies unless it shared that dependency with :app.
The text was updated successfully, but these errors were encountered:
Thanks for the feedback. It is indeed intentional. Do you have suggestion where I could put some more documentation? Inside the build scripts you needed to touch?
To explain:
org.example.root.gradle.kts - This is for making the build easier accessible. The assumption is that :app:run is the central method to run the application. So we add a lifecycle task for it to the root project. The idea is that if you run :tasks you only see the tasks you usually need to work on the project to make the project easier to access for users working with it for the first time. This is completely optional.
More explanation: https://www.youtube.com/watch?v=sOo0p4Gpjcc&t=1m17s
org.example.consistent-resolution.gradle.kts - This follows the idea, that :app is special in so far that it provides the complete runtime classpath and with that the dependency versions that will be used "for real". So we pull that into all projects with consistent resolution to make sure we use these versions everywhere.
More explanation: https://www.youtube.com/watch?v=YYWhfy6c2YQ&t=5m05s
Just how special
:app
is not clear from the documentation.Process to reproduce.
git mv app foo
./gradlew build
-> see error belowResolution:
:app
to:foo
in two filesThis may be the intended behavior but it was not what I expected.
The documentation around
:app
including dependencies should get some attention.My specific issue was that I created an application with a different name.
It was unable to resolve any dependencies unless it shared that dependency with
:app
.The text was updated successfully, but these errors were encountered: