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

Fix publisher capitalization #89

Merged
merged 3 commits into from
May 31, 2024
Merged

Fix publisher capitalization #89

merged 3 commits into from
May 31, 2024

Conversation

blampe
Copy link
Contributor

@blampe blampe commented May 30, 2024

@blampe blampe requested a review from a team May 30, 2024 14:09
@blampe blampe changed the title Fix publish capitalization Fix publisher capitalization May 30, 2024
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.71%. Comparing base (f0aaf70) to head (f3c0f51).
Report is 1 commits behind head on main.

Additional details and impacted files
Files Coverage Δ
provider/internal/provider.go 90.78% <100.00%> (+0.51%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c305ea8...f3c0f51. Read the comment docs.

@blampe blampe enabled auto-merge (squash) May 30, 2024 14:14
@mikhailshilkov
Copy link
Member

mikhailshilkov commented May 30, 2024

It looks like a slightly better thing to do is to set the homepage to https://pulumi.com

Edit: the URL is already set here, so I guess Java publishing is fine. Well, this repo doesn't seem to have a build.gradle file?

@t0yv0 t0yv0 self-requested a review May 30, 2024 15:33
@blampe
Copy link
Contributor Author

blampe commented May 30, 2024

It looks like a slightly better thing to do is to set the homepage to https://pulumi.com

Edit: the URL is already set here, so I guess Java publishing is fine. Well, this repo doesn't seem to have a build.gradle file?

@mikhailshilkov it does but it's not checked in (similar to p-command). Daniel's recent work with versioning probably makes that unnecessary. In any case here's what it looks like:

// *** 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")
    id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

group = "com.pulumi"

def resolvedVersion = System.getenv("PACKAGE_VERSION") ?:
    (project.version == "unspecified"
         ? "1.0.0-alpha.0+dev"
         : project.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 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.9.9")
}

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 = "docker-build"
        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 = "docker-build"
            version = resolvedVersion
            from components.java
            artifact sourcesJar
            artifact javadocJar

            pom {
                inceptionYear = "2022"
                name = "pulumi-docker-build"
                packaging = "jar"
                description = "A Pulumi provider for building modern Docker images with buildx and BuildKit."

                url = "https://github.com/pulumi/pulumi-docker-build"

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

                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"
                    }
                }
            }
        }
    }
}

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

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)
        sign publishing.publications.mainPublication
    }
}%

@blampe blampe disabled auto-merge May 30, 2024 16:10
@blampe blampe merged commit 9a1706a into main May 31, 2024
18 checks passed
@blampe blampe deleted the blampe/java-pom branch May 31, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants