diff --git a/aws-runtime/aws-config/build.gradle.kts b/aws-runtime/aws-config/build.gradle.kts index 3d3b23626af..8c0a8c784c0 100644 --- a/aws-runtime/aws-config/build.gradle.kts +++ b/aws-runtime/aws-config/build.gradle.kts @@ -8,7 +8,7 @@ import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionSrcDir import org.jetbrains.dokka.gradle.DokkaTaskPartial plugins { - id("aws.sdk.kotlin.gradle.smithybuild") + alias(libs.plugins.aws.kotlin.repo.tools.smithybuild) } description = "Support for AWS configuration" diff --git a/aws-runtime/build.gradle.kts b/aws-runtime/build.gradle.kts index 0365c85dee7..c7241e3737c 100644 --- a/aws-runtime/build.gradle.kts +++ b/aws-runtime/build.gradle.kts @@ -11,6 +11,7 @@ description = "AWS client runtime support for generated service clients" plugins { alias(libs.plugins.dokka) alias(libs.plugins.kotlinx.binary.compatibility.validator) + alias(libs.plugins.aws.kotlin.repo.tools.kmp) apply false jacoco } @@ -28,6 +29,7 @@ subprojects { apply { plugin("org.jetbrains.kotlin.multiplatform") plugin("org.jetbrains.dokka") + plugin(libraries.plugins.aws.kotlin.repo.tools.kmp.get().pluginId) } configurePublishing("aws-sdk-kotlin") diff --git a/build.gradle.kts b/build.gradle.kts index 7a16bc85dbc..11f19cc45d0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,23 +12,14 @@ buildscript { // only need to add e.g. atomic-fu and build-plugins here for imports and plugins to be available in subprojects. dependencies { classpath(libs.kotlinx.atomicfu.plugin) - - // FIXME - we need the ClassLoader used for Model and any traits to be the same. Unfortunately our - // build plugin has a transitive dependency on `smithy-model` which means our :codegen:sdk project - // that uses both in it's build logic won't work correctly. We "fix" this by placing them both - // into the root buildscript classpath and force them to share a class loader. - classpath(libs.smithy.model) - classpath(libs.smithy.aws.traits) + // Add our custom gradle build logic to buildscript classpath + classpath(libs.aws.kotlin.repo.tools.build.support) } } plugins { alias(libs.plugins.dokka) - // configures (KMP) subprojects with our own KMP conventions and some default dependencies - alias(libs.plugins.aws.kotlin.repo.tools.kmp) - // ensure the correct version of KGP ends up on our buildscript classpath - // since build-plugins also has version in its dependency closure alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.kotlin.jvm) apply false } diff --git a/codegen/protocol-tests/build.gradle.kts b/codegen/protocol-tests/build.gradle.kts index 3df9cf66f4d..4c6eeabe829 100644 --- a/codegen/protocol-tests/build.gradle.kts +++ b/codegen/protocol-tests/build.gradle.kts @@ -8,8 +8,8 @@ import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionPath import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionSrcDir plugins { - kotlin("jvm") // FIXME - configuration doesn't resolve without this - id("aws.sdk.kotlin.gradle.smithybuild") + kotlin("jvm") + alias(libs.plugins.aws.kotlin.repo.tools.smithybuild) } description = "Smithy protocol test suite" diff --git a/codegen/sdk/build.gradle.kts b/codegen/sdk/build.gradle.kts index b379c589989..cf1e5bf8698 100644 --- a/codegen/sdk/build.gradle.kts +++ b/codegen/sdk/build.gradle.kts @@ -16,8 +16,8 @@ import java.util.* import kotlin.streams.toList plugins { - kotlin("jvm") // FIXME - codegen configuration doesn't resolve without this - id("aws.sdk.kotlin.gradle.smithybuild") + kotlin("jvm") + alias(libs.plugins.aws.kotlin.repo.tools.smithybuild) id("sdk-bootstrap") } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a163a0deb39..96a647bd434 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ kotlin-version = "1.9.21" dokka-version = "1.9.10" -aws-kotlin-repo-tools-version = "0.3.2" +aws-kotlin-repo-tools-version = "0.4.0" # libs coroutines-version = "1.7.3" @@ -14,7 +14,6 @@ smithy-kotlin-codegen-version = "0.30.12" # codegen smithy-version = "1.42.0" -smithy-gradle-version = "0.7.0" # testing junit-version = "5.10.1" @@ -26,6 +25,8 @@ slf4j-version = "2.0.9" [libraries] +aws-kotlin-repo-tools-build-support = { module="aws.sdk.kotlin.gradle:build-support", version.ref = "aws-kotlin-repo-tools-version" } + kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin-version"} kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin-version"} kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-version" } @@ -91,7 +92,6 @@ smithy-aws-iam-traits = { module = "software.amazon.smithy:smithy-aws-iam-traits smithy-aws-cloudformation-traits = { module = "software.amazon.smithy:smithy-aws-cloudformation-traits", version.ref = "smithy-version" } smithy-model = { module = "software.amazon.smithy:smithy-model", version.ref = "smithy-version" } smithy-protocol-test-traits = { module = "software.amazon.smithy:smithy-protocol-test-traits", version.ref = "smithy-version" } -smithy-gradle-plugin = { module = "software.amazon.smithy:smithy-gradle-plugin", version.ref = "smithy-gradle-version" } smithy-smoke-test-traits = { module = "software.amazon.smithy:smithy-smoke-test-traits", version.ref = "smithy-version" } junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-version" } @@ -131,6 +131,5 @@ kotlin-multiplatform = {id = "org.jetbrains.kotlin.multiplatform", version.ref = kotlinx-benchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlinx-benchmark-version" } kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.13.2" } kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin-version"} -smithy-gradle = { id = "software.amazon.smithy", version.ref = "smithy-gradle-version" } -aws-kotlin-repo-tools-kmp = { id = "aws.sdk.kotlin.kmp", version.ref = "aws-kotlin-repo-tools-version" } +aws-kotlin-repo-tools-kmp = { id = "aws.sdk.kotlin.gradle.kmp", version.ref = "aws-kotlin-repo-tools-version" } aws-kotlin-repo-tools-smithybuild = { id = "aws.sdk.kotlin.gradle.smithybuild", version.ref = "aws-kotlin-repo-tools-version" } diff --git a/services/build.gradle.kts b/services/build.gradle.kts index e5912af66ea..b9a47ac23c5 100644 --- a/services/build.gradle.kts +++ b/services/build.gradle.kts @@ -11,6 +11,7 @@ import java.time.LocalDateTime plugins { `maven-publish` alias(libs.plugins.dokka) + alias(libs.plugins.aws.kotlin.repo.tools.kmp) apply false } val sdkVersion: String by project @@ -31,6 +32,7 @@ subprojects { apply { plugin("org.jetbrains.kotlin.multiplatform") plugin("org.jetbrains.dokka") + plugin(libraries.plugins.aws.kotlin.repo.tools.kmp.get().pluginId) } logger.info("configuring: $project") diff --git a/tests/benchmarks/service-benchmarks/build.gradle.kts b/tests/benchmarks/service-benchmarks/build.gradle.kts index 0366b195e90..32e8dca7cc0 100644 --- a/tests/benchmarks/service-benchmarks/build.gradle.kts +++ b/tests/benchmarks/service-benchmarks/build.gradle.kts @@ -6,6 +6,7 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.aws.kotlin.repo.tools.kmp) application } diff --git a/tests/codegen/event-stream/build.gradle.kts b/tests/codegen/event-stream/build.gradle.kts index 17c2b9ea81b..837d12b2d3c 100644 --- a/tests/codegen/event-stream/build.gradle.kts +++ b/tests/codegen/event-stream/build.gradle.kts @@ -9,7 +9,7 @@ import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionSrcDir plugins { alias(libs.plugins.kotlin.jvm) - id("aws.sdk.kotlin.gradle.smithybuild") + alias(libs.plugins.aws.kotlin.repo.tools.smithybuild) } description = "Event stream codegen integration test suite"