From a1927818c829aa62c71833bcfb1df3d3b5dd53dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Vester?= Date: Mon, 11 Nov 2019 11:51:12 +0100 Subject: [PATCH] Make the extension properties immutable. This gets rid of a deprecation warning in Gradle 6.0. --- README.md | 2 +- build.gradle.kts | 4 ++-- .../bjornvester/wsdl2java/Wsdl2JavaPluginExtension.kt | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d69ae8a..59f8d8f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Apply the plugin ID "com.github.bjornvester.wsdl2java" as specific in the [Gradl ```kotlin plugins { - id("com.github.bjornvester.wsdl2java") version "0.3" + id("com.github.bjornvester.wsdl2java") version "0.4" } ``` diff --git a/build.gradle.kts b/build.gradle.kts index 6f56cfa..2be50c6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } group = "com.github.bjornvester" -version = "0.3" +version = "0.4" repositories { jcenter() @@ -38,7 +38,7 @@ pluginBundle { "wsdl2JavaPlugin" { displayName = "Gradle Wsdl2Java plugin" description = "Changes: \n" + - "- Fix path separator in the WsdlLocation for the generated client when building on Windows" + "- Make the extension properties immutable. This gets rid of a deprecation warning in Gradle 6.0." tags = listOf("wsdl2java", "cxf", "wsimport") } } diff --git a/src/main/kotlin/com/github/bjornvester/wsdl2java/Wsdl2JavaPluginExtension.kt b/src/main/kotlin/com/github/bjornvester/wsdl2java/Wsdl2JavaPluginExtension.kt index 6a7d910..14b65ef 100644 --- a/src/main/kotlin/com/github/bjornvester/wsdl2java/Wsdl2JavaPluginExtension.kt +++ b/src/main/kotlin/com/github/bjornvester/wsdl2java/Wsdl2JavaPluginExtension.kt @@ -7,8 +7,8 @@ import org.gradle.api.provider.Property import javax.inject.Inject open class Wsdl2JavaPluginExtension @Inject constructor(project: Project) { - var wsdlDir: DirectoryProperty = project.objects.directoryProperty().convention(project.layout.projectDirectory.dir("src/main/resources")) - var wsdlFiles: ConfigurableFileCollection = project.objects.fileCollection() - var generatedSourceDir: DirectoryProperty = project.objects.directoryProperty().convention(project.layout.buildDirectory.dir("generated/wsdl2java")) - var cxfVersion: Property = project.objects.property(String::class.java).convention("3.3.2") + val wsdlDir: DirectoryProperty = project.objects.directoryProperty().convention(project.layout.projectDirectory.dir("src/main/resources")) + val wsdlFiles: ConfigurableFileCollection = project.objects.fileCollection() + val generatedSourceDir: DirectoryProperty = project.objects.directoryProperty().convention(project.layout.buildDirectory.dir("generated/wsdl2java")) + val cxfVersion: Property = project.objects.property(String::class.java).convention("3.3.2") }