Skip to content

Commit

Permalink
Fix java build
Browse files Browse the repository at this point in the history
  • Loading branch information
corymhall committed Jun 17, 2024
1 parent 4243adc commit 39313d8
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ install_python_sdk:: # Required by CI

# Java SDK

generate_java: # Required by CI
pulumi package gen-sdk ${SCHEMA_PATH} -o sdk --language java
generate_java: .pulumi/bin/pulumi # Required by CI
.pulumi/bin/pulumi package gen-sdk ${SCHEMA_PATH} --language java --version ${VERSION_GENERIC}
cp ${WORKING_DIR}/README.md sdk/java
build_java: # Required by CI
cd sdk/java && gradle --console=plain build
Expand Down
17 changes: 17 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"name": "lambda-builders",
"displayName": "AWS Lambda Builders",
"description": "Utilities for building AWS Lambda Functions",
"repository": "https://github.com/pulumi/pulumi-lambda-builders",
"homepage": "https://pulumi.com",
"license": "Apache-2.0",
"publisher": "Pulumi",
"resources": {},
"language": {
"csharp": {
Expand All @@ -20,6 +26,17 @@
"typescript": "^4.6.3"
}
},
"java": {
"basePackage": "",
"buildFiles": "gradle",
"dependencies": {
"com.google.code.findbugs:jsr305": "3.0.2",
"com.google.code.gson:gson": "2.8.9",
"com.pulumi:pulumi": "0.9.9"
},
"gradleNexusPublishPluginVersion": "1.1.0",
"gradleTest": ""
},
"python": {
"requires": {
"pulumi": ">=3.0.0,<4.0.0",
Expand Down
12 changes: 6 additions & 6 deletions sdk/dotnet/Pulumi.LambdaBuilders.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Pulumi Corp.</Authors>
<Company>Pulumi Corp.</Company>
<Description></Description>
<PackageLicenseExpression></PackageLicenseExpression>
<PackageProjectUrl></PackageProjectUrl>
<RepositoryUrl></RepositoryUrl>
<Authors>Pulumi</Authors>
<Company>Pulumi</Company>
<Description>Utilities for building AWS Lambda Functions</Description>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://pulumi.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/pulumi/pulumi-lambda-builders</RepositoryUrl>
<PackageIcon>logo.png</PackageIcon>

<TargetFramework>net6.0</TargetFramework>
Expand Down
1 change: 1 addition & 0 deletions sdk/dotnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Utilities for building AWS Lambda Functions
2 changes: 1 addition & 1 deletion sdk/go/lambda-builders/doc.go
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Package lambdabuilders exports types, functions, subpackages for provisioning lambdabuilders resources.
// Utilities for building AWS Lambda Functions
package lambdabuilders
153 changes: 153 additions & 0 deletions sdk/java/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
// *** WARNING: this file was generated by pulumi-java-gen ***

Check failure on line 1 in sdk/java/build.gradle

View workflow job for this annotation

GitHub Actions / build_sdks (java)

Unexpected file modified

File modified: @@ -12,7 +12,7 @@ group = "com.pulumi" def resolvedVersion = System.getenv("PACKAGE_VERSION") ?: (project.version == "unspecified" - ? "1.0.0-alpha.0+dev" + ? "0.1.0-alpha.1718651641" : project.version) def signingKey = System.getenv("SIGNING_KEY")
// *** 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 = "lambda-builders"
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 = "lambda-builders"
version = resolvedVersion
from components.java
artifact sourcesJar
artifact javadocJar

pom {
inceptionYear = "2022"
name = "pulumi-lambda-builders"
packaging = "jar"
description = "Utilities for building AWS Lambda Functions"

url = "https://github.com/pulumi/pulumi-lambda-builders"

scm {
connection = "[email protected]/pulumi/pulumi-lambda-builders.git"
developerConnection = "[email protected]/pulumi/pulumi-lambda-builders.git"
url = "https://github.com/pulumi/pulumi-lambda-builders"
}

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 = "[email protected]"
}
}
}
}
}
}

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
}
}
14 changes: 14 additions & 0 deletions sdk/java/settings.gradle
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.lambda-builders"
include("lib")
1 change: 1 addition & 0 deletions sdk/nodejs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Utilities for building AWS Lambda Functions
3 changes: 3 additions & 0 deletions sdk/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "@pulumi/lambda-builders",
"version": "${VERSION}",
"homepage": "https://pulumi.com",
"repository": "https://github.com/pulumi/pulumi-lambda-builders",
"license": "Apache-2.0",
"scripts": {
"build": "tsc"
},
Expand Down
1 change: 1 addition & 0 deletions sdk/python/pulumi_lambda_builders/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Utilities for building AWS Lambda Functions
6 changes: 6 additions & 0 deletions sdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ def readme():
setup(name='pulumi_lambda_builders',
python_requires='>=3.8',
version=VERSION,
description="Utilities for building AWS Lambda Functions",
long_description=readme(),
long_description_content_type='text/markdown',
url='https://pulumi.com',
project_urls={
'Repository': 'https://github.com/pulumi/pulumi-lambda-builders'
},
license='Apache-2.0',
packages=find_packages(),
package_data={
'pulumi_lambda_builders': [
Expand Down

0 comments on commit 39313d8

Please sign in to comment.