diff --git a/README.md b/README.md index 36b27e2..42c402c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Apply the plugin ID "com.github.bjornvester.wsdl2java" as specific in the [Gradl ```kotlin plugins { - id("com.github.bjornvester.wsdl2java") version "2.0.1" + id("com.github.bjornvester.wsdl2java") version "2.0.2" } ``` diff --git a/build.gradle.kts b/build.gradle.kts index 4f1c8ca..6275b2e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } group = "com.github.bjornvester" -version = "2.0.1" +version = "2.0.2" repositories { mavenCentral() @@ -53,8 +53,7 @@ gradlePlugin { tags.set(listOf("wsdl2java", "cxf", "wsimport")) implementationClass = "com.github.bjornvester.wsdl2java.Wsdl2JavaPlugin" description = "Changes:\n" + - " - Fixed a problem in older versions of Gradle when not specifying a Java toolchain.\n" + - " - Due to compatability issues not found version 2.0.0 of the plugin, the plugin now requires at least Gradle 7.6" + " - Fixed missing task dependency on wsdl2java from sourcesJar" } } } diff --git a/integration-test/buildSrc/src/main/kotlin/com.github.bjornvester.wsdl2java.internal.java-conventions.gradle.kts b/integration-test/buildSrc/src/main/kotlin/com.github.bjornvester.wsdl2java.internal.java-conventions.gradle.kts index 318c7cb..b9b8e8f 100644 --- a/integration-test/buildSrc/src/main/kotlin/com.github.bjornvester.wsdl2java.internal.java-conventions.gradle.kts +++ b/integration-test/buildSrc/src/main/kotlin/com.github.bjornvester.wsdl2java.internal.java-conventions.gradle.kts @@ -21,3 +21,7 @@ dependencies { tasks.test { useJUnitPlatform() } + +java { + withSourcesJar() +} diff --git a/src/main/kotlin/com/github/bjornvester/wsdl2java/Wsdl2JavaPlugin.kt b/src/main/kotlin/com/github/bjornvester/wsdl2java/Wsdl2JavaPlugin.kt index 8e17f68..6d402de 100644 --- a/src/main/kotlin/com/github/bjornvester/wsdl2java/Wsdl2JavaPlugin.kt +++ b/src/main/kotlin/com/github/bjornvester/wsdl2java/Wsdl2JavaPlugin.kt @@ -87,15 +87,11 @@ class Wsdl2JavaPlugin : Plugin { val currentJavaToolchain = project.extensions.getByType(JavaPluginExtension::class.java).toolchain val currentJvmLauncherProvider = toolchainService.launcherFor(currentJavaToolchain) javaLauncher.convention(currentJvmLauncherProvider) - - val sourceSets = project.properties["sourceSets"] as SourceSetContainer - sourceSets.named(MAIN_SOURCE_SET_NAME) { - java.srcDir(sourcesOutputDir) - } } - project.tasks.named(JavaPlugin.COMPILE_JAVA_TASK_NAME) { - dependsOn(wsdl2JavaTask) + val sourceSets = project.properties["sourceSets"] as SourceSetContainer + sourceSets.named(MAIN_SOURCE_SET_NAME) { + java.srcDir(wsdl2JavaTask) } return wsdl2JavaTask