Skip to content

Commit f545ae7

Browse files
committed
Extend section about how to disable the plugin's effect
1 parent 676a972 commit f545ae7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,20 +114,36 @@ you can deactivate it for the runtime classpath as the module information is irr
114114

115115
**Kotlin DSL**
116116
```
117+
// Disable for a single Classpath (Configuration)
117118
configurations {
118119
runtimeClasspath { // testRuntimeClasspath, testCompileClasspath, ...
119120
attributes { attribute(Attribute.of("javaModule", Boolean::class.javaObjectType), false) }
120121
}
121122
}
123+
124+
// Disable for all 'annotationProcessor' paths
125+
sourceSets.all {
126+
configurations.getByName(annotationProcessorConfigurationName) {
127+
attributes { attribute(Attribute.of("javaModule", Boolean::class.javaObjectType), false) }
128+
}
129+
}
122130
```
123131

124132
**Groovy DSL**
125133
```
134+
// Disable for a single Classpath (Configuration)
126135
configurations {
127136
runtimeClasspath { // testRuntimeClasspath, testCompileClasspath, ...
128137
attributes { attribute(Attribute.of("javaModule", Boolean), false) }
129138
}
130139
}
140+
141+
// Disable for all 'annotationProcessor' paths
142+
sourceSets.all {
143+
configurations.getByName(annotationProcessorConfigurationName) {
144+
attributes { attribute(Attribute.of("javaModule", Boolean), false) }
145+
}
146+
}
131147
```
132148

133149
## How do I add `provides ... with ...` declarations to the `module-info.class` descriptor?

0 commit comments

Comments
 (0)