Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema build config #1593

Open
danielrbradley opened this issue Jan 15, 2025 · 0 comments · May be fixed by #1612
Open

Add schema build config #1593

danielrbradley opened this issue Jan 15, 2025 · 0 comments · May be fixed by #1612
Assignees
Labels
kind/enhancement Improvements or new features
Milestone

Comments

@danielrbradley
Copy link
Member

danielrbradley commented Jan 15, 2025

When calling the java-gen program, we used the option --build gradle-nexus to also generate the gradle build files. Internally, this set the configuration:

  "buildFiles": "gradle",
  "gradleNexusPublishPluginVersion": "2.0.0",

When moving to running java SDK generation via pulumi package gen-sdk, we can't set CLI arguments and don't want to have to hard code plugin versions in our schemas.

Therefore, it would be nice to have a new language configuration key to mirror the old CLI argument behaviour so we can just add to our schemas:

  "build": "gradle-nexus",

See also: pulumi/pulumi-azure-native#3776

This would also avoid providers pinning to a specific version of the gradle plugin and would allow codegen to seamlessly upgrade this in the future.

@danielrbradley danielrbradley added the kind/enhancement Improvements or new features label Jan 15, 2025
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Jan 15, 2025
@danielrbradley danielrbradley removed the needs-triage Needs attention from the triage team label Jan 15, 2025
@julienp julienp self-assigned this Jan 28, 2025
@julienp julienp added this to the 0.116 milestone Jan 28, 2025
julienp added a commit that referenced this issue Jan 30, 2025
When using `pulumi-java-gen`, the user can bass a `—build` flag which the following options:

* `none`: no gradle file is generated (the default)
* `gradle`: a gradle file is generated -> BuildFiles: gradle
* `gradle-nexus`: a gradle file using the nexus publishing plugin is generated, using a default version of the plugin -> BuildFiles: gradle, GradleNexusPublishPluginVersion: 2.0.0
* `gradle-nexus:$VER`: a gradle file using the nexus publishing plugin is generated, using the version $VER for the plugin -> BuildFiles: gradle, GradleNexusPublishPluginVersion: $VER

Using `gen-sdk`, the options are managed via the schema, `buildFiles` can take the following options:
* `gradle-nexus`: the default if the buildFiles is not set, a gradle file using the nexus publishing plugin is generated, implies `gradleNexusPublishPluginVersion: 2.0.0` if `gradleNexusPublishPluginVersionA` is not set.
* `gradle`: a gradle file is generated, but without the nexus publishing plugin
* `none`: no gradle file is generated

Fixes #1593
@julienp julienp linked a pull request Jan 30, 2025 that will close this issue
julienp added a commit that referenced this issue Jan 30, 2025
When using `pulumi-java-gen`, the user can bass a `—build` flag which the following options:

* `none`: no gradle file is generated (the default)
* `gradle`: a gradle file is generated -> BuildFiles: gradle
* `gradle-nexus`: a gradle file using the nexus publishing plugin is generated, using a default version of the plugin -> BuildFiles: gradle, GradleNexusPublishPluginVersion: 2.0.0
* `gradle-nexus:$VER`: a gradle file using the nexus publishing plugin is generated, using the version $VER for the plugin -> BuildFiles: gradle, GradleNexusPublishPluginVersion: $VER

Using `gen-sdk`, the options are managed via the schema, `buildFiles` can take the following options:
* `gradle-nexus`: the default if the buildFiles is not set, a gradle file using the nexus publishing plugin is generated, implies `gradleNexusPublishPluginVersion: 2.0.0` if `gradleNexusPublishPluginVersionA` is not set.
* `gradle`: a gradle file is generated, but without the nexus publishing plugin
* `none`: no gradle file is generated

Fixes #1593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants