uranusjr commented on code in PR #74096:
URL: https://github.com/apache/airflow/pull/74096#discussion_r4214910440
##########
java-sdk/plugin/src/main/kotlin/org/apache/airflow/sdk/plugin/AirflowSdkPlugin.kt:
##########
@@ -107,21 +120,45 @@ class AirflowSdkPlugin : Plugin<Project> {
ext.fatJar.convention(true)
project.afterEvaluate {
+ val main =
project.extensions.getByType(SourceSetContainer::class.java).getByName("main")
+
+ val packTask =
+ project.tasks.register("packDagSources", PackDagSources::class.java) {
task ->
+ task.group = "build"
+ task.description = "Collects the source file of each Dag and the
entrypoint to pack into the bundle JAR."
+ task.dependsOn(project.tasks.named("classes"))
+ task.onlyIf { ext.mainClass.isPresent }
+ task.mainClass.set(ext.mainClass)
+ task.classesDirs.from(main.output.classesDirs)
+ task.runtimeClasspath.from(main.output, main.runtimeClasspath)
Review Comment:
```suggestion
task.runtimeClasspath.from(main.runtimeClasspath)
```
`main.output` already includes `classesDirs`, which are also on the describe
classpath via `classesDirs`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]