Skip to content

Java gradle plugin and project split - #68380

Merged
uranusjr merged 3 commits into
apache:mainfrom
astronomer:java-gradle-plugin
Jun 12, 2026
Merged

uranusjr merged 3 commits into
apache:mainfrom
astronomer:java-gradle-plugin

Conversation

@uranusjr

Copy link
Copy Markdown
Member

The annotation processor has been split into a separate (sub)project since it is a build-time only dependency and does not need to be with the main SDK code, which contains mostly runtime code.

A new "Airflow SDK plugin" is also added to wrap logic in the user's build file so the user can simply add the plugin, fill out required fields in the 'airflowBundle' block, and that's it. This should make building a Java task bundle a lot easier.

Due to Gradle constraints, the example has been split into a stadnalone project (instead of a subproject of java-sdk) so it can make use of the plugin. This makes building the example a bit more difficult—it now requires you to mavenPublishToLocal first so the plugins and dependencies can correctly resolve. I think it’s acceptable.

The documentation and SDK README have been modified to reflect the changes.

Close #66328

@uranusjr
uranusjr requested a review from jason810496 June 11, 2026 08:47
@uranusjr uranusjr added this to the Airflow 3.3.0 milestone Jun 11, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Java-SDK Jun 11, 2026
@uranusjr uranusjr moved this from Backlog to In review in Java-SDK Jun 11, 2026
Comment thread java-sdk/example/build.gradle Resolved

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM overall.

Comment thread java-sdk/README.md Resolved
@uranusjr
uranusjr force-pushed the java-gradle-plugin branch 2 times, most recently from 5aefa97 to 6be0aa6 Compare June 12, 2026 06:47
uranusjr added 2 commits June 12, 2026 16:10
The annotation processor has been split into a separate (sub)project
since it is a build-time only dependency and does not need to be with
the main SDK code, which contains mostly runtime code.

A new "Airflow SDK plugin" is also added to wrap logic in the user's
build file so the user can simply add the plugin, fill out required
fields in the 'airflowBundle' block, and that's it. This should make
building a Java task bundle a lot easier.
This allows the example to be as close to a real world use as possible.
The downside is the user must do mavenPublishLocal first on the main
projects to make the example build, but I feel this is reasonable.
A new subproject 'bom' was added to publish the BOM containing the
Supervisor Schema version associated with an SDK version for Maven to
consume.

Since the BOM release is not a Java library, some refactoring is needed
to not apply incorrect configuration on that subproject. This is
fortunately pretty simply handled by the new buildSrc mechanism.
@uranusjr
uranusjr force-pushed the java-gradle-plugin branch from 6be0aa6 to 2eeee29 Compare June 12, 2026 08:10
@uranusjr
uranusjr merged commit 390fc45 into apache:main Jun 12, 2026
148 checks passed
@uranusjr
uranusjr deleted the java-gradle-plugin branch June 12, 2026 09:26
@github-project-automation github-project-automation Bot moved this from In review to Done in Java-SDK Jun 12, 2026
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Gradle Extension for Java SDK

3 participants