Skip to content

Commit

Permalink
Remove java dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
blampe committed Dec 28, 2024
1 parent 8be3784 commit c2e078f
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .pulumi.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.142.0
3.143.0
5 changes: 0 additions & 5 deletions provider/cmd/pulumi-resource-command/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
},
"java": {
"buildFiles": "gradle",
"dependencies": {
"com.google.code.findbugs:jsr305": "3.0.2",
"com.google.code.gson:gson": "2.8.9",
"com.pulumi:pulumi": "0.10.0"
},
"gradleNexusPublishPluginVersion": "2.0.0"
},
"nodejs": {
Expand Down
4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/pkg/sftp v1.13.6
github.com/pulumi/providertest v0.1.3
github.com/pulumi/pulumi-go-provider v0.24.0
github.com/pulumi/pulumi/sdk/v3 v3.142.0
github.com/pulumi/pulumi/sdk/v3 v3.143.0
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.31.0
)
Expand Down Expand Up @@ -140,7 +140,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect
github.com/pulumi/esc v0.10.0 // indirect
github.com/pulumi/pulumi/pkg/v3 v3.142.0 // indirect
github.com/pulumi/pulumi/pkg/v3 v3.143.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,10 @@ github.com/pulumi/providertest v0.1.3 h1:GpNKRy/haNjRHiUA9bi4diU4Op2zf3axYXbga5A
github.com/pulumi/providertest v0.1.3/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0=
github.com/pulumi/pulumi-go-provider v0.24.0 h1:aMvl7RvNBsrZMaE/RXmw8h8o6AzO6YOB69HRpJAlgtk=
github.com/pulumi/pulumi-go-provider v0.24.0/go.mod h1:ckAHu+Kp0vTdnaVB0s0zJC/b6axoakyPMQXgyQ+ZMFM=
github.com/pulumi/pulumi/pkg/v3 v3.142.0 h1:UE8TFyXrlxvPrATpd3Kl3En34KrFIFWOxxNAodywPNU=
github.com/pulumi/pulumi/pkg/v3 v3.142.0/go.mod h1:3k6WwRIT7veiDnk3Yo2NtqEYX+4dgLCrMIFvEOnjQqI=
github.com/pulumi/pulumi/sdk/v3 v3.142.0 h1:SmcVddGuvwAh3g3XUVQQ5gVRQUKH1yZ6iETpDNHIHlw=
github.com/pulumi/pulumi/sdk/v3 v3.142.0/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI=
github.com/pulumi/pulumi/pkg/v3 v3.143.0 h1:diAlaNVZSRc59ePqbMuvuf/AwecpZyjhh1pGvmLEUwg=
github.com/pulumi/pulumi/pkg/v3 v3.143.0/go.mod h1:XzjN1uQI2HWXYolT2L4RIXzvLEnWTSOzFgFFIUfFEa8=
github.com/pulumi/pulumi/sdk/v3 v3.143.0 h1:z1m8Fc6l723eU2J/bP7UHE5t6WbBu4iIDAl1WaalQk4=
github.com/pulumi/pulumi/sdk/v3 v3.143.0/go.mod h1:OFpZabILGxrFqzcABFpMCksrHGVp4ymRM2BkKjlazDY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
Expand Down
5 changes: 0 additions & 5 deletions provider/pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ func NewProvider() p.Provider {
"java": map[string]any{
"buildFiles": "gradle",
"gradleNexusPublishPluginVersion": "2.0.0",
"dependencies": map[string]any{
"com.pulumi:pulumi": "0.10.0",
"com.google.code.gson:gson": "2.8.9",
"com.google.code.findbugs:jsr305": "3.0.2",
},
},
},
},
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/Local/Run.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public static Task<RunResult> InvokeAsync(RunArgs args, InvokeOptions? options =
/// </summary>
public static Output<RunResult> Invoke(RunInvokeArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.Invoke<RunResult>("command:local:run", args ?? new RunInvokeArgs(), options.WithDefaults());

/// <summary>
/// A local command to be executed.
/// This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.
/// </summary>
public static Output<RunResult> Invoke(RunInvokeArgs args, InvokeOutputOptions options)
=> global::Pulumi.Deployment.Instance.Invoke<RunResult>("command:local:run", args ?? new RunInvokeArgs(), options.WithDefaults());
}


Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ static class Utilities
return dst;
}

public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src)
{
var dst = src ?? new global::Pulumi.InvokeOutputOptions{};
dst.Version = src?.Version ?? Version;
return dst;
}

private readonly static string version;
public static string Version => version;

Expand Down
17 changes: 3 additions & 14 deletions sdk/go/command/local/run.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 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:0.18.0")
}

task sourcesJar(type: Jar) {
Expand Down
31 changes: 22 additions & 9 deletions sdk/java/src/main/java/com/pulumi/command/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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
2 changes: 1 addition & 1 deletion sdk/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "tsc"
},
"dependencies": {
"@pulumi/pulumi": "^3.136.0"
"@pulumi/pulumi": "^3.142.0"
},
"devDependencies": {
"@types/node": "^14",
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[project]
name = "pulumi_command"
description = "The Pulumi Command Provider enables you to execute commands and scripts either locally or remotely as part of the Pulumi resource model."
dependencies = ["parver>=0.2.1", "pulumi>=3.136.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""]
dependencies = ["parver>=0.2.1", "pulumi>=3.142.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""]
keywords = ["pulumi", "command", "category/utility", "kind/native"]
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
version = "1.0.0a0+dev"
[project.license]
text = "Apache-2.0"
Expand Down

0 comments on commit c2e078f

Please sign in to comment.