Skip to content

Commit

Permalink
Replace pulumi-java-gen with pulumi package gen-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Frassle committed Aug 5, 2024
1 parent 93b4649 commit acef66a
Show file tree
Hide file tree
Showing 3,670 changed files with 3,679 additions and 3,687 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ OPENAPI_FILE := ${OPENAPI_DIR}/swagger-${KUBE_VERSION}.json
SCHEMA_FILE := provider/cmd/pulumi-resource-kubernetes/schema.json
GOPATH := $(shell go env GOPATH)

JAVA_GEN := pulumi-java-gen
JAVA_GEN_VERSION := v0.13.0

WORKING_DIR := $(shell pwd)

# Override during CI using `make [TARGET] PROVIDER_VERSION=""` or by setting a PROVIDER_VERSION environment variable
Expand Down Expand Up @@ -96,16 +93,13 @@ python_sdk::
PYPI_VERSION=$(PYPI_VERSION) ./scripts/build_python_sdk.sh

java_sdk:: PACKAGE_VERSION := $(shell pulumictl convert-version --language generic -v "$(VERSION_GENERIC)")
java_sdk:: bin/pulumi-java-gen
$(WORKING_DIR)/bin/$(JAVA_GEN) generate --schema $(SCHEMA_FILE) --overlay provider/pkg/gen/java-templates \
--out sdk/java --build gradle-nexus
java_sdk::
pulumi package gen-sdk --language java $(SCHEMA_FILE) \
--overlays provider/pkg/gen/java-templates --out sdk
cd ${PACKDIR}/java/ && \
echo "module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
gradle --console=plain build

bin/pulumi-java-gen::
$(shell pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java)

.PHONY: build
build:: k8sgen openapi_file schema k8sprovider nodejs_sdk go_sdk python_sdk dotnet_sdk java_sdk

Expand Down
1 change: 1 addition & 0 deletions provider/cmd/pulumi-resource-kubernetes/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
"respectSchemaVersion": true
},
"java": {
"buildFiles": "gradle",
"dependencies": {
"com.google.guava:guava": "32.1.2-jre",
"net.bytebuddy:byte-buddy": "1.14.15"
Expand Down
3 changes: 2 additions & 1 deletion provider/pkg/gen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ additional information about using Server-Side Apply to manage Kubernetes resour
})

pkg.Language["java"] = rawMessage(map[string]any{
"packages": javaPackages,
"buildFiles": "gradle",
"packages": javaPackages,
"dependencies": map[string]string{
"net.bytebuddy:byte-buddy": "1.14.15",
"com.google.guava:guava": "32.1.2-jre",
Expand Down
32 changes: 14 additions & 18 deletions sdk/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
id("signing")
id("java-library")
id("maven-publish")
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

group = "com.pulumi"
Expand All @@ -17,7 +16,7 @@ def resolvedVersion = System.getenv("PACKAGE_VERSION") ?:

def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
def publishRepoURL = System.getenv("PUBLISH_REPO_URL") ?: "https://s01.oss.sonatype.org"
def publishRepoURL = System.getenv("PUBLISH_REPO_URL")
def publishRepoUsername = System.getenv("PUBLISH_REPO_USERNAME")
def publishRepoPassword = System.getenv("PUBLISH_REPO_PASSWORD")

Expand All @@ -42,10 +41,7 @@ repositories {
}

dependencies {
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("com.google.code.gson:gson:2.8.9")
implementation("com.google.guava:guava:32.1.2-jre")
implementation("com.pulumi:pulumi:0.13.0")
implementation("net.bytebuddy:byte-buddy:1.14.15")
}

Expand Down Expand Up @@ -121,6 +117,19 @@ publishing {
}
}
}

if (publishRepoURL) {
repositories {
maven {
name = "PublishRepo"
url = publishRepoURL
credentials {
username = publishRepoUsername
password = publishRepoPassword
}
}
}
}
}

javadoc {
Expand All @@ -134,19 +143,6 @@ jar {
zip64 = true
}

if (publishRepoUsername) {
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri(publishRepoURL + "/service/local/"))
snapshotRepositoryUrl.set(uri(publishRepoURL + "/content/repositories/snapshots/"))
username = publishRepoUsername
password = publishRepoPassword
}
}
}
}

if (signingKey) {
signing {
useInMemoryPgpKeys(signingKey, signingPassword)
Expand Down
2 changes: 1 addition & 1 deletion sdk/java/src/main/java/com/pulumi/kubernetes/Config.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes;
Expand Down
2 changes: 1 addition & 1 deletion sdk/java/src/main/java/com/pulumi/kubernetes/Provider.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

package com.pulumi.kubernetes.admissionregistration.v1.inputs;
Expand Down
Loading

0 comments on commit acef66a

Please sign in to comment.