spring-gradle-plugins / dependency-management-plugin

A Gradle plugin that provides Maven-like dependency management functionality
690 stars 88 forks source link

Is it possible to use this with android? #202

Closed robbypond closed 6 years ago

robbypond commented 6 years ago

This plugin doesn't seem to work with Android applications/libraries. It doesn't appear to recognize the configurations that android uses (implementation instead of compile, etc).

wilkinsona commented 6 years ago

Yes, it should be possible. The plugin doesn't care about the names of the configurations. What, precisely, does "doesn't seem to work" mean? What did you expect to happen and what actually happened? Can you provide an example that reproduces the behaviour you're seeing?

robbypond commented 6 years ago

It appears to be trying to resolve dependencies via the configured maven repos when it is omitting the versions specified in the dependencyManagement extension.

Example output below:

FAILURE: Build failed with an exception.

A sample project is attached.

testapp.tar.gz

wilkinsona commented 6 years ago

Dependency management isn't inherited and you have only configured it on the root project. As a result, your app project has no dependency management so its dependencies fail to resolve. If you want the app project to use dependency management, you could move the dependency management configuration into allprojects or declare it in a new subprojects block.