Skip to content

Commit

Permalink
Regenerating Java SDK based on updated modules
Browse files Browse the repository at this point in the history
  • Loading branch information
rquitales committed Jan 29, 2025
1 parent bc11424 commit fc13a39
Show file tree
Hide file tree
Showing 22 changed files with 61 additions and 37 deletions.
16 changes: 9 additions & 7 deletions sdk/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repositories {
dependencies {
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("com.google.code.gson:gson:2.8.9")
implementation("com.pulumi:pulumi:0.10.0")
implementation("com.pulumi:pulumi:1.0.0")
}

task sourcesJar(type: Jar) {
Expand All @@ -65,11 +65,13 @@ def genPulumiResources = tasks.register('genPulumiResources') {
def outDir = file("$resourcesDir/$subDir")
outDir.mkdirs()
new File(outDir, "version.txt").text = resolvedVersion
def info = new Object()
info.metaClass.resource = true
info.metaClass.name = "command"
info.metaClass.version = resolvedVersion
def infoJson = new groovy.json.JsonBuilder(info).toPrettyString()
def builder = new groovy.json.JsonBuilder()
builder {
resource true
name "command"
version resolvedVersion
}
def infoJson = builder.toPrettyString()
new File(outDir, "plugin.json").text = infoJson
}
}
Expand Down Expand Up @@ -150,4 +152,4 @@ if (signingKey) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mainPublication
}
}
}
2 changes: 1 addition & 1 deletion sdk/java/src/main/java/com/pulumi/command/Provider.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command;
Expand Down
33 changes: 23 additions & 10 deletions sdk/java/src/main/java/com/pulumi/command/Utilities.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command;
Expand All @@ -14,6 +14,7 @@
import javax.annotation.Nullable;
import com.pulumi.core.internal.Environment;
import com.pulumi.deployment.InvokeOptions;
import com.pulumi.deployment.InvokeOutputOptions;

public class Utilities {

Expand Down Expand Up @@ -57,16 +58,28 @@ public static Optional<java.lang.Double> getEnvDouble(java.lang.String... names)
return Optional.empty();
}

public static InvokeOptions withVersion(@Nullable InvokeOptions options) {
if (options != null && options.getVersion().isPresent()) {
return options;
}
return new InvokeOptions(
options == null ? null : options.getParent().orElse(null),
options == null ? null : options.getProvider().orElse(null),
getVersion()
);
public static InvokeOptions withVersion(@Nullable InvokeOptions options) {
if (options != null && options.getVersion().isPresent()) {
return options;
}
return new InvokeOptions(
options == null ? null : options.getParent().orElse(null),
options == null ? null : options.getProvider().orElse(null),
getVersion()
);
}

public static InvokeOutputOptions withVersion(@Nullable InvokeOutputOptions options) {
if (options != null && options.getVersion().isPresent()) {
return options;
}
return new InvokeOutputOptions(
options == null ? null : options.getParent().orElse(null),
options == null ? null : options.getProvider().orElse(null),
getVersion(),
options == null ? null : options.getDependsOn()
);
}

private static final java.lang.String version;
public static java.lang.String getVersion() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.local;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.local;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.local;
Expand All @@ -11,6 +11,7 @@
import com.pulumi.core.TypeShape;
import com.pulumi.deployment.Deployment;
import com.pulumi.deployment.InvokeOptions;
import com.pulumi.deployment.InvokeOutputOptions;
import java.util.concurrent.CompletableFuture;

public final class LocalFunctions {
Expand Down Expand Up @@ -38,6 +39,14 @@ public static CompletableFuture<RunResult> runPlain(RunPlainArgs args) {
public static Output<RunResult> run(RunArgs args, InvokeOptions options) {
return Deployment.getInstance().invoke("command:local:run", TypeShape.of(RunResult.class), args, Utilities.withVersion(options));
}
/**
* A local command to be executed.
* This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.
*
*/
public static Output<RunResult> run(RunArgs args, InvokeOutputOptions options) {
return Deployment.getInstance().invoke("command:local:run", TypeShape.of(RunResult.class), args, Utilities.withVersion(options));
}
/**
* A local command to be executed.
* This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.local.enums;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.local.inputs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.local.inputs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.local.outputs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote.enums;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote.inputs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote.inputs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote.outputs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi. ***
// *** WARNING: this file was generated by pulumi-language-java. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.command.remote.outputs;
Expand Down

0 comments on commit fc13a39

Please sign in to comment.