Skip to content

Commit

Permalink
Fixing task dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed May 22, 2024
1 parent fa8d73c commit 0642b77
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,13 @@ class LanguagePluginInstance(
}

// Make `compileJava` depend on our task, because we generate Java code.
project.tasks.getByName(JavaPlugin.COMPILE_JAVA_TASK_NAME).dependsOn(compileTask)
project.tasks.named(JavaPlugin.COMPILE_JAVA_TASK_NAME) {
dependsOn(compileTask)
}
// Also make `processResources` depend on our task, because we generate resource files.
project.tasks.getByName(JavaPlugin.PROCESS_RESOURCES_TASK_NAME).dependsOn(compileTask)
project.tasks.named(JavaPlugin.PROCESS_RESOURCES_TASK_NAME) {
dependsOn(compileTask)
}
}

private fun ResourcePath.tryAsLocal(name: String, func: (file: File) -> Unit) {
Expand Down

0 comments on commit 0642b77

Please sign in to comment.