Reputation: 19446
How can we declare a dependency as provided from another module? i.e. something like:
dependencies {
compile 'javax.persistence:persistence-api:1.0'
provided 'com.google.code.gson:gson:2.5'
}
but instead of pulling dependency from a repo, I want to include a project in another project. I would expect something like this to work:
dependency {
compile 'javax.persistence:persistence-api:1.0'
provided project(':mymodule')
}
Upvotes: 1
Views: 537
Reputation: 23805
Gradle does not have a built in provided
scope/configuration. You can define your own provided configuration. See here: https://stackoverflow.com/a/34899917/745574
But in your case, you do not really need it. As long as mymodule is already in settings.gradle, just include your module as:
compile project(':mymodule')
Upvotes: 2