Skip to content

Commit 35760ec

Browse files
committed
Syntax update and README update detailing feature
1 parent cb59566 commit 35760ec

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,15 @@ configurations.runtimeClasspath {
259259
}
260260
```
261261

262+
In addition to creating a common configuration for resolution, a platform project can also be enabled to enforce
263+
versions.
264+
265+
```kotlin
266+
extraJavaModuleInfo {
267+
platformDependency = project.provider { project.dependencies.platform(project.dependencies.create("org.example:bom:1.0.0")) }
268+
}
269+
```
270+
262271
## I have many automatic modules in my project. How can I convert them into proper modules and control what they export or require?
263272

264273
The plugin provides a set of `<sourceSet>moduleDescriptorRecommendations` tasks that generate the real module declarations utilizing [jdeps](https://docs.oracle.com/en/java/javase/11/tools/jdeps.html) and dependency metadata.

src/test/groovy/org/gradlex/javamodule/moduleinfo/test/EdgeCasesFunctionalTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class EdgeCasesFunctionalTest extends Specification {
278278
279279
extraJavaModuleInfo {
280280
failOnAutomaticModules.set(true)
281-
platformDependency.set(project.provider { project.dependencies.platform(project.dependencies.create(springBom)) as? org.gradle.api.artifacts.ModuleDependency })
281+
platformDependency.set(project.provider { project.dependencies.platform(project.dependencies.create(springBom)) })
282282
module("org.springframework:spring-jcl", "spring.jcl")
283283
}
284284
"""

0 commit comments

Comments
 (0)