From 1bcebfe11f1e38c03b9278ba53768f21ad26b3bf Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 26 Jan 2023 12:16:04 +0100 Subject: [PATCH] Fix plugin descriptor not generated for Maven plugin --- .../src/main/java/org/teavm/buildutil/MavenPluginPlugin.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-logic/src/main/java/org/teavm/buildutil/MavenPluginPlugin.java b/build-logic/src/main/java/org/teavm/buildutil/MavenPluginPlugin.java index f51bc06d5..d9e262aed 100644 --- a/build-logic/src/main/java/org/teavm/buildutil/MavenPluginPlugin.java +++ b/build-logic/src/main/java/org/teavm/buildutil/MavenPluginPlugin.java @@ -16,6 +16,7 @@ package org.teavm.buildutil; import java.io.File; +import java.util.Map; import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.api.plugins.JavaLibraryPlugin; @@ -47,8 +48,8 @@ public class MavenPluginPlugin implements Plugin { var sourceSets = project.getExtensions().getByType(SourceSetContainer.class); var main = sourceSets.getByName("main"); task.getClassesDirectory().convention(main.getOutput().getClassesDirs().getSingleFile()); - task.dependsOn(project.getTasks().getByName(JavaPlugin.CLASSES_TASK_NAME)); - main.getOutput().dir(generatedDir); + task.dependsOn(project.getTasks().getByName(JavaPlugin.COMPILE_JAVA_TASK_NAME)); + main.getOutput().dir(Map.of("builtBy", task), generatedDir); } private void installDependencies(Project project) {