Skip to content

Commit

Permalink
Converting extensions to extras. Other changes addressing comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
yasmewad committed Nov 13, 2024
1 parent 62d865c commit e9b566c
Show file tree
Hide file tree
Showing 29 changed files with 115 additions and 152 deletions.
6 changes: 2 additions & 4 deletions smithy-aws-apigateway-openapi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
description = "This module provides support for converting the Amazon API Gateway " +
"Smithy traits when converting a Smithy model to OpenAPI3."

ext {
set("displayName", "Smithy :: Amazon API Gateway OpenAPI Support")
set("moduleName", "software.amazon.smithy.aws.apigateway.openapi")
}
extra["displayName"] = "Smithy :: Amazon API Gateway OpenAPI Support"
extra["moduleName"] = "software.amazon.smithy.aws.apigateway.openapi"

dependencies {
api(project(":smithy-aws-apigateway-traits"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-aws-apigateway-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "This module provides Smithy traits and validators for API Gateway."

ext {
set("displayName", "Smithy :: AWS :: API Gateway Traits")
set("moduleName", "software.amazon.smithy.aws.apigateway.traits")
}
extra["displayName"] = "Smithy :: AWS :: API Gateway Traits"
extra["moduleName"] = "software.amazon.smithy.aws.apigateway.traits"

dependencies {
api(project(":smithy-aws-traits"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-aws-cloudformation-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "This module provides Smithy traits and validators for CloudFormation."

ext {
set("displayName", "Smithy :: AWS :: CloudFormation Traits")
set("moduleName", "software.amazon.smithy.aws.cloudformation.traits")
}
extra["displayName"] = "Smithy :: AWS :: CloudFormation Traits"
extra["moduleName"] = "software.amazon.smithy.aws.cloudformation.traits"

dependencies {
api(project(":smithy-model"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-aws-cloudformation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "This module contains support for converting Smithy resources to CloudFormation Resource Schemas."

ext {
set("displayName", "Smithy :: Cloudformation Conversion")
set("moduleName", "software.amazon.smithy.cloudformation.converter")
}
extra["displayName"] = "Smithy :: Cloudformation Conversion"
extra["moduleName"] = "software.amazon.smithy.cloudformation.converter"

// Necessary to load the everit JSON Schema validator.
repositories {
Expand Down
6 changes: 2 additions & 4 deletions smithy-aws-endpoints/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

description = "AWS specific components for managing endpoints in Smithy"

ext {
set("displayName", "Smithy :: AWS Endpoints Components")
set("moduleName","software.amazon.smithy.aws.endpoints")
}
extra["displayName"] = "Smithy :: AWS Endpoints Components"
extra["moduleName"] = "software.amazon.smithy.aws.endpoints"

dependencies {
api(project(":smithy-aws-traits"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-aws-iam-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "This module provides Smithy traits and validators for IAM."

ext {
set("displayName", "Smithy :: AWS :: IAM Traits")
set("moduleName", "software.amazon.smithy.aws.iam.traits")
}
extra["displayName"] = "Smithy :: AWS :: IAM Traits"
extra["moduleName"] = "software.amazon.smithy.aws.iam.traits"

dependencies {
api(project(":smithy-aws-traits"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-aws-protocol-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ plugins {

description = "Defines protocol tests for AWS HTTP protocols."

ext {
set("displayName", "Smithy :: AWS :: Protocol Tests")
set("moduleName", "software.amazon.smithy.aws.protocoltests")
}
extra["displayName"] = "Smithy :: AWS :: Protocol Tests"
extra["moduleName"] = "software.amazon.smithy.aws.protocoltests"

dependencies {
implementation(project(path = ":smithy-cli", configuration = "shadow"))
Expand Down
4 changes: 2 additions & 2 deletions smithy-aws-smoke-test-model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
description = "Defines shapes used by AWS for modeling smoke tests"

ext {
set("displayName", "Smithy :: AWS :: Smoke Test :: Model")
set("moduleName", "software.amazon.smithy.aws.smoketest.model")
extra["displayName"] = "Smithy :: AWS :: Smoke Test :: Model"
extra["moduleName"] = "software.amazon.smithy.aws.smoketest.model"
}

dependencies {
Expand Down
6 changes: 2 additions & 4 deletions smithy-aws-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "This module provides Smithy traits and validators that are used by most AWS services."

ext {
set("displayName", "Smithy :: AWS Core Traits")
set("moduleName", "software.amazon.smithy.aws.traits")
}
extra["displayName"] = "Smithy :: AWS Core Traits"
extra["moduleName"] = "software.amazon.smithy.aws.traits"

dependencies {
api(project(":smithy-diff"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-build/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
description = "This module is a library used to validate Smithy models, create filtered " +
"projections of a model, and generate build artifacts."

ext {
set("displayName", "Smithy :: Build")
set("moduleName", "software.amazon.smithy.build")
}
extra["displayName"] = "Smithy :: Build"
extra["moduleName"] = "software.amazon.smithy.build"

dependencies {
api(project(":smithy-utils"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-codegen-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
description = "This module provides a code generation framework for generating clients, " +
"servers, documentation, and other artifacts for various languages from Smithy models."

ext {
set("displayName", "Smithy :: Code Generation Framework")
set("moduleName", "software.amazon.smithy.codegen.core")
}
extra["displayName"] = "Smithy :: Code Generation Framework"
extra["moduleName"] = "software.amazon.smithy.codegen.core"

dependencies {
api(project(":smithy-utils"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-diff/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
description = "This module detects differences between two Smithy models, identifying " +
"changes that are safe and changes that are backward incompatible."

ext {
set("displayName", "Smithy :: Diff")
set("moduleName", "software.amazon.smithy.diff")
}
extra["displayName"] = "Smithy :: Diff"
extra["moduleName"] = "software.amazon.smithy.diff"

dependencies {
api(project(":smithy-utils"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-jmespath/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@

description = "A standalone JMESPath parser"

ext {
set("displayName", "Smithy :: JMESPath")
set("moduleName", "software.amazon.smithy.jmespath")
}
extra["displayName"] = "Smithy :: JMESPath"
extra["moduleName"] = "software.amazon.smithy.jmespath"
6 changes: 2 additions & 4 deletions smithy-jsonschema/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "This module contains support for converting a Smithy model to JSON Schema."

ext {
set("displayName", "Smithy :: JSON Schema Conversion")
set("moduleName", "software.amazon.smithy.jsonschema")
}
extra["displayName"] = "Smithy :: JSON Schema Conversion"
extra["moduleName"] = "software.amazon.smithy.jsonschema"

dependencies {
api(project(":smithy-utils"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-linters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
description = "This module provides support for customizable linters declared in the " +
"metadata section of a Smithy model."

ext {
set("displayName", "Smithy :: Linters")
set("moduleName", "software.amazon.smithy.linters")
}
extra["displayName"] = "Smithy :: Linters"
extra["moduleName"] = "software.amazon.smithy.linters"

dependencies {
api(project(":smithy-model"))
Expand Down
12 changes: 6 additions & 6 deletions smithy-model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
description = "This module provides the core implementation of loading, validating, " +
"traversing, mutating, and serializing a Smithy model."

ext {
set("displayName","Smithy :: Model")
set("moduleName", "software.amazon.smithy.model")
}
extra["displayName"] = "Smithy :: Model"
extra["moduleName"] = "software.amazon.smithy.model"

plugins {
id("me.champeau.jmh")
Expand All @@ -34,6 +32,8 @@ jmh {
timeUnit = "us"
}

tasks.processJmhResources {
duplicatesStrategy = DuplicatesStrategy.WARN
tasks {
processJmhResources {
duplicatesStrategy = DuplicatesStrategy.WARN
}
}
6 changes: 2 additions & 4 deletions smithy-mqtt-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "This module provides the implementation of MQTT binding traits for Smithy."

ext {
set("displayName", "Smithy :: MQTT Traits")
set("moduleName", "software.amazon.smithy.mqtt.traits")
}
extra["displayName"] = "Smithy :: MQTT Traits"
extra["moduleName"] = "software.amazon.smithy.mqtt.traits"

dependencies {
api(project(":smithy-utils"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-openapi-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

description = "This module provides Smithy traits that are used in converting a Smithy model to OpenAPI."

ext {
set("displayName", "Smithy :: OpenAPI Traits")
set("moduleName", "software.amazon.smithy.openapi.traits")
}
extra["displayName"] = "Smithy :: OpenAPI Traits"
extra["moduleName"] = "software.amazon.smithy.openapi.traits"

dependencies {
api(project(":smithy-model"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-openapi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "This module contains support for converting a Smithy model to OpenAPI."

ext {
set("displayName", "Smithy :: OpenAPI Conversion")
set("moduleName", "software.amazon.smithy.openapi")
}
extra["displayName"] = "Smithy :: OpenAPI Conversion"
extra["moduleName"] = "software.amazon.smithy.openapi"

dependencies {
api(project(":smithy-model"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-protocol-test-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "Defines protocol test traits."

ext {
set("displayName", "Smithy :: Protocol Test Traits")
set("moduleName", "software.amazon.smithy.protocoltest.traits")
}
extra["displayName"] = "Smithy :: Protocol Test Traits"
extra["moduleName"] = "software.amazon.smithy.protocoltest.traits"

dependencies {
api(project(":smithy-model"))
Expand Down
14 changes: 6 additions & 8 deletions smithy-protocol-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
* SPDX-License-Identifier: Apache-2.0
*/



plugins {
id("software.amazon.smithy.gradle.smithy-jar")
}

description = "Defines protocol tests for Smithy HTTP protocols."

ext {
set("displayName", "Smithy :: Protocol Tests")
set("moduleName", "software.amazon.smithy.protocoltests")
}
extra["displayName"] = "Smithy :: Protocol Tests"
extra["moduleName"] = "software.amazon.smithy.protocoltests"

dependencies {
implementation(project(path= ":smithy-cli", configuration= "shadow"))
Expand All @@ -23,8 +19,10 @@ dependencies {
api(project(":smithy-validation-model"))
}

tasks.sourcesJar {
dependsOn("smithyJarStaging")
tasks{
sourcesJar {
dependsOn("smithyJarStaging")
}
}

smithy {
Expand Down
6 changes: 2 additions & 4 deletions smithy-protocol-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

description = "This module provides the implementation of protocol traits for Smithy."

ext {
set("displayName", "Smithy :: Protocol Traits")
set("moduleName", "software.amazon.smithy.protocol.traits")
}
extra["displayName"] = "Smithy :: Protocol Traits"
extra["moduleName"] = "software.amazon.smithy.protocol.traits"

dependencies {
api(project(":smithy-utils"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-rules-engine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

description = "Smithy rules engine Language and traits"

ext {
set("displayName", "Smithy :: Rules Engine")
set("moduleName", "software.amazon.smithy.rulesengine")
}
extra["displayName"] = "Smithy :: Rules Engine"
extra["moduleName"] = "software.amazon.smithy.rulesengine"

dependencies {
api(project(":smithy-model"))
Expand Down
6 changes: 2 additions & 4 deletions smithy-smoke-test-traits/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "Defines smoke test traits."

ext {
set("displayName", "Smithy :: Smoke Test Traits")
set("moduleName", "software.amazon.smithy.smoketest.traits")
}
extra["displayName"] = "Smithy :: Smoke Test Traits"
extra["moduleName"] = "software.amazon.smithy.smoketest.traits"

dependencies {
api(project(":smithy-model"))
Expand Down
36 changes: 18 additions & 18 deletions smithy-syntax/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

description = "Provides a parse tree and formatter for Smithy models."

ext {
set("displayName", "Smithy :: Syntax")
set("moduleName", "software.amazon.smithy.syntax")
}
extra["displayName"] = "Smithy :: Syntax"
extra["moduleName"] = "software.amazon.smithy.syntax"

dependencies {
api(project(":smithy-utils"))
Expand All @@ -30,23 +28,25 @@ dependencies {
shadow(project(":smithy-utils"))
}

tasks.shadowJar {
// Replace the normal JAR with the shaded JAR. We don't want to publish a JAR that isn't shaded.
archiveClassifier.set("")
tasks {
shadowJar {
// Replace the normal JAR with the shaded JAR. We don't want to publish a JAR that isn't shaded.
archiveClassifier.set("")

mergeServiceFiles()
mergeServiceFiles()

// Shade and relocate prettier4j.
relocate("com.opencastsoftware.prettier4j", "software.amazon.smithy.syntax.shaded.prettier4j")
// Shade and relocate prettier4j.
relocate("com.opencastsoftware.prettier4j", "software.amazon.smithy.syntax.shaded.prettier4j")

// Despite the "shadow" configuration under dependencies, we unfortunately need to also list here that
// smithy-model and smithy-utils aren't shaded. These are normal dependencies that we want consumers to resolve.
dependencies {
exclude(project(":smithy-utils"))
exclude(project(":smithy-model"))
// Despite the "shadow" configuration under dependencies, we unfortunately need to also list here that
// smithy-model and smithy-utils aren't shaded. These are normal dependencies that we want consumers to resolve.
dependencies {
exclude(project(":smithy-utils"))
exclude(project(":smithy-model"))
}
}
}

tasks.jar {
finalizedBy(tasks.shadowJar)
jar {
finalizedBy(shadowJar)
}
}
Loading

0 comments on commit e9b566c

Please sign in to comment.