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
@@ -191,7 +191,7 @@ Only if you use _real_ modules (Jars with `module-info.class`) everywhere you ca
191
191
Still, using automatic modules is more convenient if you need to work with a lot of legacy libraries, because you do not need to define `exports` and `requires` directives.
192
192
Alternatively though, this plugin offers a way to define a _real_ module, without defining all of those directives explicitly:
@@ -223,7 +223,7 @@ To create such a common classpath, some setup work is needed.
223
223
And it depends on your overall project structure if and how to do that.
224
224
Here is an example setup you may use:
225
225
226
-
```
226
+
```kotlin
227
227
val consistentResolutionAttribute =Attribute.of("consistent-resolution", String::class.java)
228
228
229
229
// Define an Outgoing Variant (aka Consumable Configuration) that knows about all dependencies
@@ -270,15 +270,15 @@ NOTE: This functionality requires Gradle to be run with Java 11+ and failing on
270
270
271
271
If your goal is to fully modularize your application, you should enable the following configuration setting, which is disabled by default.
272
272
273
-
```
273
+
```kotlin
274
274
extraJavaModuleInfo {
275
275
failOnAutomaticModules =true
276
276
}
277
277
```
278
278
279
279
With this setting enabled, the build will fail unless you define a module override for every automatic module that appears in your dependency tree, as shown below.
280
280
281
-
```
281
+
```kotlin
282
282
dependencies {
283
283
implementation("org.yaml:snakeyaml:1.33")
284
284
}
@@ -297,8 +297,8 @@ The Java Module System does not allow the same package to be used in more than o
297
297
This is an issue with legacy libraries, where it was common practice to use the same package in multiple Jars.
298
298
This plugin offers the option to merge multiple Jars into one in such situations:
0 commit comments