Skip to content

Commit 1b6b76e

Browse files
committed
reworked 'provided' configuration so it works properly (should not be repackaged in our jars)
1 parent e17a2f9 commit 1b6b76e

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

gradle/provided-configuration.gradle

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,18 @@
1919
* DEALINGS IN THE SOFTWARE.
2020
*/
2121

22-
// Adding the "provided" configuration
23-
24-
ext {
25-
PROVIDED_CONFIGURATION_NAME = "provided"
22+
// Defines the "provided" configuration for dependencies that the client is responsible for including on the classpath
23+
configurations {
24+
provided
2625
}
2726

28-
configurations {
29-
provided {
30-
// Remove the provided dependencies from the default configuration so
31-
// these dependencies won't be derived by projects that has a dependency on
32-
// the project using the provided scope
33-
dependencies.all { dep ->
34-
configurations.default.exclude group: dep.group, module: dep.name
35-
}
27+
sourceSets {
28+
main {
29+
compileClasspath += configurations.provided
30+
runtimeClasspath += configurations.provided
31+
}
32+
test {
33+
compileClasspath += configurations.provided
34+
runtimeClasspath += configurations.provided
3635
}
37-
compile.extendsFrom provided
3836
}
39-

0 commit comments

Comments
 (0)