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) {