Skip to content

Commit

Permalink
update pkg refs, latest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFriel committed Apr 12, 2024
1 parent 598c58c commit fed755d
Show file tree
Hide file tree
Showing 88 changed files with 9,093 additions and 166 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test description
152 changes: 152 additions & 0 deletions pkg/codegen/testing/test/testdata/kubernetes20/java/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
// *** WARNING: this file was generated by pulumi-java-gen ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

plugins {
id("signing")
id("java-library")
id("maven-publish")
}

group = "com.pulumi"

def resolvedVersion = System.getenv("PACKAGE_VERSION") ?:
(project.version == "unspecified"
? "0.0.1"
: project.version)

def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
def publishRepoURL = System.getenv("PUBLISH_REPO_URL")
def publishRepoUsername = System.getenv("PUBLISH_REPO_USERNAME")
def publishRepoPassword = System.getenv("PUBLISH_REPO_PASSWORD")

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}

compileJava {
options.fork = true
options.forkOptions.jvmArgs.addAll(["-Xmx16g"])
options.encoding = "UTF-8"
}

repositories {
mavenLocal()
maven { // The google mirror is less flaky than mavenCentral()
url("https://maven-central.storage-download.googleapis.com/maven2/")
}
mavenCentral()
}

dependencies {
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("com.google.code.gson:gson:2.8.9")
implementation("com.pulumi:pulumi:0.0.1")
}

task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier.set('sources')
}

task javadocJar(type: Jar) {
from javadoc
archiveClassifier.set('javadoc')
zip64 = true
}

def genPulumiResources = tasks.register('genPulumiResources') {
doLast {
def resourcesDir = sourceSets.main.output.resourcesDir
def subDir = project.name.replace(".", "/")
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 = "kubernetes"
info.metaClass.version = resolvedVersion
def infoJson = new groovy.json.JsonBuilder(info).toPrettyString()
new File(outDir, "plugin.json").text = infoJson
}
}

jar.configure {
dependsOn genPulumiResources
}

publishing {
publications {
mainPublication(MavenPublication) {
groupId = "com.pulumi"
artifactId = "kubernetes"
version = resolvedVersion
from components.java
artifact sourcesJar
artifact javadocJar

pom {
inceptionYear = "2022"
name = "pulumi-kubernetes"
packaging = "jar"
description = "test description"

url = "https://github.com/pulumi/pulumi-java"

scm {
connection = "git@github.com/pulumi/pulumi-java.git"
developerConnection = "git@github.com/pulumi/pulumi-java.git"
url = "https://github.com/pulumi/pulumi-java"
}

licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}

developers {
developer {
id = "pulumi"
name = "Pulumi"
email = "support@pulumi.com"
}
}
}
}
}

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

javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
options.jFlags("-Xmx8g", "-Xms512m")
}

jar {
zip64 = true
}

if (signingKey) {
signing {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mainPublication
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"emittedFiles": [
"README.md",
"build.gradle",
"settings.gradle",
"src/main/java/com/pulumi/kubernetes/Config.java",
"src/main/java/com/pulumi/kubernetes/Provider.java",
"src/main/java/com/pulumi/kubernetes/ProviderArgs.java",
"src/main/java/com/pulumi/kubernetes/Utilities.java",
"src/main/java/com/pulumi/kubernetes/core_v1/ConfigMap.java",
"src/main/java/com/pulumi/kubernetes/core_v1/ConfigMapArgs.java",
"src/main/java/com/pulumi/kubernetes/core_v1/ConfigMapList.java",
"src/main/java/com/pulumi/kubernetes/core_v1/ConfigMapListArgs.java",
"src/main/java/com/pulumi/kubernetes/core_v1/inputs/ConfigMapArgs.java",
"src/main/java/com/pulumi/kubernetes/core_v1/outputs/ConfigMap.java",
"src/main/java/com/pulumi/kubernetes/helm/sh_v3/Release.java",
"src/main/java/com/pulumi/kubernetes/helm/sh_v3/ReleaseArgs.java",
"src/main/java/com/pulumi/kubernetes/inputs/KubeClientSettingsArgs.java",
"src/main/java/com/pulumi/kubernetes/meta_v1/inputs/ListMetaArgs.java",
"src/main/java/com/pulumi/kubernetes/meta_v1/inputs/ManagedFieldsEntryArgs.java",
"src/main/java/com/pulumi/kubernetes/meta_v1/inputs/ObjectMetaArgs.java",
"src/main/java/com/pulumi/kubernetes/meta_v1/inputs/OwnerReferenceArgs.java",
"src/main/java/com/pulumi/kubernetes/meta_v1/outputs/ListMeta.java",
"src/main/java/com/pulumi/kubernetes/meta_v1/outputs/ManagedFieldsEntry.java",
"src/main/java/com/pulumi/kubernetes/meta_v1/outputs/ObjectMeta.java",
"src/main/java/com/pulumi/kubernetes/meta_v1/outputs/OwnerReference.java",
"src/main/java/com/pulumi/kubernetes/yaml_v2/ConfigGroup.java",
"src/main/java/com/pulumi/kubernetes/yaml_v2/ConfigGroupArgs.java"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

pluginManagement {
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url("https://maven-central.storage-download.googleapis.com/maven2/")
}
gradlePluginPortal()
}
}

rootProject.name = "com.pulumi.kubernetes"
include("lib")
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes;

import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Optional;

public final class Config {

private static final com.pulumi.Config config = com.pulumi.Config.of("kubernetes");
/**
* The contents of a kubeconfig file or the path to a kubeconfig file. If this is set, this config will be used instead of $KUBECONFIG.
*
*/
public Optional<String> kubeconfig() {
return Codegen.stringProp("kubeconfig").config(config).get();
}
/**
* If present, the default namespace to use. This flag is ignored for cluster-scoped resources.
*
* A namespace can be specified in multiple places, and the precedence is as follows:
* 1. `.metadata.namespace` set on the resource.
* 2. This `namespace` parameter.
* 3. `namespace` set for the active context in the kubeconfig.
*
*/
public Optional<String> namespace() {
return Codegen.stringProp("namespace").config(config).get();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.kubernetes.ProviderArgs;
import com.pulumi.kubernetes.Utilities;
import javax.annotation.Nullable;

/**
* The provider type for the kubernetes package.
*
*/
@ResourceType(type="pulumi:providers:kubernetes")
public class Provider extends com.pulumi.resources.ProviderResource {
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Provider(String name) {
this(name, ProviderArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Provider(String name, @Nullable ProviderArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Provider(String name, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}

private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}

}
Loading

0 comments on commit fed755d

Please sign in to comment.