From a6e0b16e7f81d61f46e01158953af72c6edeff0c Mon Sep 17 00:00:00 2001 From: JordonPhillips Date: Thu, 24 Oct 2024 16:56:42 +0200 Subject: [PATCH] Lock Smithy to a static version This updates our Smithy versioning to a single static version that is not synced via gradle properties. The version currently locked in is 1.52.0, which is not the latest, but 1.52.1 has a bug that prevents us from generating protocol tests. Instead of relying on the version range to keep us up to date, we will now be relying on dependabot. It can also track all the different dependency file locations, which removes the need for the syncing via gradle properties. --- codegen/gradle.properties | 2 -- codegen/settings.gradle.kts | 2 +- .../build.gradle.kts | 16 +------------- .../build.gradle.kts | 6 ++--- .../smithy-python-codegen/build.gradle.kts | 22 ++++--------------- .../build.gradle.kts | 4 +--- 6 files changed, 9 insertions(+), 43 deletions(-) delete mode 100644 codegen/gradle.properties diff --git a/codegen/gradle.properties b/codegen/gradle.properties deleted file mode 100644 index 5b1ac9304..000000000 --- a/codegen/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -smithyVersion=[1.48.0,2.0) -smithyGradleVersion=1.0.0 diff --git a/codegen/settings.gradle.kts b/codegen/settings.gradle.kts index e79595fdf..ab75cdc51 100644 --- a/codegen/settings.gradle.kts +++ b/codegen/settings.gradle.kts @@ -26,6 +26,6 @@ pluginManagement { } val smithyGradleVersion: String by settings plugins { - id("software.amazon.smithy.gradle.smithy-base").version(smithyGradleVersion) + id("software.amazon.smithy.gradle.smithy-base").version("1.1.0") } } diff --git a/codegen/smithy-aws-python-codegen/build.gradle.kts b/codegen/smithy-aws-python-codegen/build.gradle.kts index 14e78d25d..5671b6794 100644 --- a/codegen/smithy-aws-python-codegen/build.gradle.kts +++ b/codegen/smithy-aws-python-codegen/build.gradle.kts @@ -7,21 +7,7 @@ description = "Generates AWS Python code from Smithy models" extra["displayName"] = "Smithy :: AWS :: Python :: Codegen" extra["moduleName"] = "software.amazon.smithy.aws.python.codegen" -val smithyVersion: String by project - -buildscript { - val smithyVersion: String by project - - repositories { - mavenLocal() - mavenCentral() - } - dependencies { - "classpath"("software.amazon.smithy:smithy-cli:$smithyVersion") - } -} - dependencies { implementation(project(":smithy-python-codegen")) - implementation("software.amazon.smithy:smithy-aws-traits:$smithyVersion") + implementation("software.amazon.smithy:smithy-aws-traits:1.52.0") } diff --git a/codegen/smithy-python-codegen-test/build.gradle.kts b/codegen/smithy-python-codegen-test/build.gradle.kts index 91201f092..a9ffefd6c 100644 --- a/codegen/smithy-python-codegen-test/build.gradle.kts +++ b/codegen/smithy-python-codegen-test/build.gradle.kts @@ -26,10 +26,8 @@ repositories { mavenCentral() } -val smithyVersion: String by project - dependencies { implementation(project(":smithy-python-codegen")) - implementation("software.amazon.smithy:smithy-waiters:$smithyVersion") - implementation("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion") + implementation("software.amazon.smithy:smithy-waiters:1.52.0") + implementation("software.amazon.smithy:smithy-protocol-test-traits:1.52.0") } diff --git a/codegen/smithy-python-codegen/build.gradle.kts b/codegen/smithy-python-codegen/build.gradle.kts index 0e5f171be..b868c9aee 100644 --- a/codegen/smithy-python-codegen/build.gradle.kts +++ b/codegen/smithy-python-codegen/build.gradle.kts @@ -17,24 +17,10 @@ description = "Generates Python code from Smithy models" extra["displayName"] = "Smithy :: Python :: Codegen" extra["moduleName"] = "software.amazon.smithy.python.codegen" -val smithyVersion: String by project - -buildscript { - val smithyVersion: String by project - - repositories { - mavenLocal() - mavenCentral() - } - dependencies { - "classpath"("software.amazon.smithy:smithy-cli:$smithyVersion") - } -} - dependencies { - api("software.amazon.smithy:smithy-codegen-core:$smithyVersion") - implementation("software.amazon.smithy:smithy-waiters:$smithyVersion") - implementation("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion") + api("software.amazon.smithy:smithy-codegen-core:1.52.0") + implementation("software.amazon.smithy:smithy-waiters:1.52.0") + implementation("software.amazon.smithy:smithy-protocol-test-traits:1.52.0") // We have this because we're using RestJson1 as a 'generic' protocol. - implementation("software.amazon.smithy:smithy-aws-traits:$smithyVersion") + implementation("software.amazon.smithy:smithy-aws-traits:1.52.0") } diff --git a/codegen/smithy-python-protocol-test/build.gradle.kts b/codegen/smithy-python-protocol-test/build.gradle.kts index 7cce5c4fa..8cb7545bc 100644 --- a/codegen/smithy-python-protocol-test/build.gradle.kts +++ b/codegen/smithy-python-protocol-test/build.gradle.kts @@ -26,9 +26,7 @@ repositories { mavenCentral() } -val smithyVersion: String by project - dependencies { implementation(project(":smithy-python-codegen")) - implementation("software.amazon.smithy:smithy-aws-protocol-tests:$smithyVersion") + implementation("software.amazon.smithy:smithy-aws-protocol-tests:1.52.0") }