Skip to content

Add a Gradle Plugin for codegen#1235

Merged
adwsingh merged 6 commits into
mainfrom
adwsingh/gradle-plugin
Jun 16, 2026
Merged

Add a Gradle Plugin for codegen#1235
adwsingh merged 6 commits into
mainfrom
adwsingh/gradle-plugin

Conversation

@adwsingh

Copy link
Copy Markdown
Contributor

What behavior changes?

Adds a Gradle plugin (software.amazon.smithy.java.gradle.smithy-java) that replaces manual smithy-base + afterEvaluate boilerplate with a single plugin application that auto-wires source sets, dependencies, and task ordering.

Why is this change needed?

Every customer project currently duplicates ~30 lines of Gradle plumbing to wire generated code. This plugin makes the zero-config path a one-liner and provides an explicit DSL (modes, generatedPluginOutputs) for customization.

How was this validated?

./gradlew :mcp:mcp-schemas:sourcesJar :mcp:mcp-schemas:jar --rerun-tasks --configuration-cache passes with correct service files in all artifacts. Configuration cache reuse confirmed on subsequent runs.

What should reviewers focus on?

SmithyJavaPlugin.java (dependency wiring via ValueSource, service-file merge with eachFile source-path filtering) and SmithyBuildModesValueSource.java (configuration cache tracked file read).

Additional Links

N/A


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@adwsingh adwsingh requested review from sugmanue and yasmewad June 10, 2026 17:31
@adwsingh adwsingh force-pushed the adwsingh/gradle-plugin branch from b19eccd to 7687f8a Compare June 10, 2026 17:31
Comment thread gradle-plugin/build.gradle.kts Outdated
@adwsingh adwsingh force-pushed the adwsingh/gradle-plugin branch from 7687f8a to cc09ab3 Compare June 10, 2026 21:40
@adwsingh adwsingh force-pushed the adwsingh/gradle-plugin branch 3 times, most recently from 4c661c2 to 60f025e Compare June 11, 2026 21:50
@adwsingh adwsingh requested a review from timocov June 11, 2026 21:51
@adwsingh adwsingh force-pushed the adwsingh/gradle-plugin branch from 60f025e to 7e4b3e6 Compare June 12, 2026 03:29
@adwsingh adwsingh force-pushed the adwsingh/gradle-plugin branch from 7e4b3e6 to e556773 Compare June 12, 2026 22:09
@adwsingh adwsingh merged commit e19d5a2 into main Jun 16, 2026
5 checks passed
@adwsingh adwsingh deleted the adwsingh/gradle-plugin branch June 16, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants