Skip to content

Commit c336eb7

Browse files
committed
fix gradle 9 compatibility
1 parent 915a68b commit c336eb7

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Fix gradle 9 compatibility
2+
13
### 3.0.0 (2024-03-10)
24
* (BREAKING) Drop gradle 5 and 6 support
35
* (BREAKING) Always use native javadoc and source jars tasks (withJavadocJar() and withSourcesJar())

src/main/groovy/ru/vyarus/gradle/plugin/lib/JavaLibPlugin.groovy

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,15 @@ class JavaLibPlugin implements Plugin<Project> {
181181
}
182182

183183
private void configureJar(Project project, MavenPublication publication) {
184+
Provider<String> version = project.provider { project.version }
185+
Provider<String> group = project.provider { project.group }
186+
Provider<String> name = project.provider { project.name }
184187
project.tasks.register('generatePomPropertiesFile') {
185188
it.with {
186189
inputs.properties([
187-
'version': "${ -> project.version }",
188-
'groupId': "${ -> project.group }",
189-
'artifactId': "${ -> project.name }",
190+
'version': "${ -> version.get() }",
191+
'groupId': "${ -> group.get() }",
192+
'artifactId': "${ -> name.get() }",
190193
])
191194
outputs.file project.layout.buildDirectory.file('generatePomPropertiesFile/pom.properties')
192195
doLast {

0 commit comments

Comments
 (0)