From 76607d7ee5804b7830f69789c0659dc7efe8f552 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Tue, 25 Jun 2019 15:32:04 +0300 Subject: [PATCH] chore(java): use "software.amazon.awscdk.core" for core module (#3058) use software.amazon.awscdk.core as the java package name for the core package, so it won't conflict with the old "cdk" package which used software.amazon.awscdk.core misc: include sdk-api-metadata.json in @aws-cdk/custom-resources --- packages/@aws-cdk/core/package.json | 4 ++-- packages/@aws-cdk/custom-resources/.gitignore | 4 +++- packages/@aws-cdk/custom-resources/.npmignore | 1 - tools/pkglint/lib/rules.ts | 11 +++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 6458d9261a416..c47e1f94d0f1f 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -8,7 +8,7 @@ "outdir": "dist", "targets": { "java": { - "package": "software.amazon.awscdk", + "package": "software.amazon.awscdk.core", "maven": { "groupId": "software.amazon.awscdk", "artifactId": "core" @@ -88,4 +88,4 @@ "node": ">= 8.10.0" }, "stability": "experimental" -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/custom-resources/.gitignore b/packages/@aws-cdk/custom-resources/.gitignore index 205e21fe7353b..2d2ddd427ea42 100644 --- a/packages/@aws-cdk/custom-resources/.gitignore +++ b/packages/@aws-cdk/custom-resources/.gitignore @@ -13,4 +13,6 @@ lib/generated/resources.ts coverage .nycrc .LAST_PACKAGE -*.snk \ No newline at end of file +*.snk + +lib/sdk-api-metadata.json diff --git a/packages/@aws-cdk/custom-resources/.npmignore b/packages/@aws-cdk/custom-resources/.npmignore index 4a9a3886b71a4..fad8fa155163c 100644 --- a/packages/@aws-cdk/custom-resources/.npmignore +++ b/packages/@aws-cdk/custom-resources/.npmignore @@ -17,4 +17,3 @@ dist *.tsbuildinfo -lib/sdk-api-metadata.json diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index bb180a261de01..8b96c4fdb722c 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -485,13 +485,12 @@ function cdkModuleName(name: string) { const pythonName = name.replace(/^@/g, "").replace(/\//g, ".").split(".").map(caseUtils.kebab).join("."); return { - javaPackage: `software.amazon.awscdk${(isCdkPkg || isLegacyCdkPkg) ? '' : `.${name.replace(/^aws-/, 'services-').replace(/-/g, '.')}`}`, + javaPackage: `software.amazon.awscdk${isLegacyCdkPkg ? '' : `.${name.replace(/^aws-/, 'services-').replace(/-/g, '.')}`}`, mavenArtifactId: - isCdkPkg ? 'core' - : isLegacyCdkPkg ? 'cdk' - : name.startsWith('aws-') || name.startsWith('alexa-') - ? name.replace(/^aws-/, '') - : `cdk-${name}`, + isLegacyCdkPkg ? 'cdk' + : isCdkPkg ? 'core' + : name.startsWith('aws-') || name.startsWith('alexa-') ? name.replace(/^aws-/, '') + : `cdk-${name}`, dotnetNamespace: `Amazon.CDK${isCdkPkg ? '' : `.${dotnetSuffix}`}`, python: { distName: `aws-cdk.${pythonName}`,