Skip to content

Commit 10d8f6d

Browse files
authored
refactor: upstream plugin changes (#1195)
1 parent cfabca9 commit 10d8f6d

File tree

9 files changed

+17
-22
lines changed

9 files changed

+17
-22
lines changed

aws-runtime/aws-config/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionSrcDir
88
import org.jetbrains.dokka.gradle.DokkaTaskPartial
99

1010
plugins {
11-
id("aws.sdk.kotlin.gradle.smithybuild")
11+
alias(libs.plugins.aws.kotlin.repo.tools.smithybuild)
1212
}
1313

1414
description = "Support for AWS configuration"

aws-runtime/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ description = "AWS client runtime support for generated service clients"
1111
plugins {
1212
alias(libs.plugins.dokka)
1313
alias(libs.plugins.kotlinx.binary.compatibility.validator)
14+
alias(libs.plugins.aws.kotlin.repo.tools.kmp) apply false
1415
jacoco
1516
}
1617

@@ -28,6 +29,7 @@ subprojects {
2829
apply {
2930
plugin("org.jetbrains.kotlin.multiplatform")
3031
plugin("org.jetbrains.dokka")
32+
plugin(libraries.plugins.aws.kotlin.repo.tools.kmp.get().pluginId)
3133
}
3234

3335
configurePublishing("aws-sdk-kotlin")

build.gradle.kts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,14 @@ buildscript {
1212
// only need to add e.g. atomic-fu and build-plugins here for imports and plugins to be available in subprojects.
1313
dependencies {
1414
classpath(libs.kotlinx.atomicfu.plugin)
15-
16-
// FIXME - we need the ClassLoader used for Model and any traits to be the same. Unfortunately our
17-
// build plugin has a transitive dependency on `smithy-model` which means our :codegen:sdk project
18-
// that uses both in it's build logic won't work correctly. We "fix" this by placing them both
19-
// into the root buildscript classpath and force them to share a class loader.
20-
classpath(libs.smithy.model)
21-
classpath(libs.smithy.aws.traits)
15+
// Add our custom gradle build logic to buildscript classpath
16+
classpath(libs.aws.kotlin.repo.tools.build.support)
2217
}
2318
}
2419

2520
plugins {
2621
alias(libs.plugins.dokka)
27-
// configures (KMP) subprojects with our own KMP conventions and some default dependencies
28-
alias(libs.plugins.aws.kotlin.repo.tools.kmp)
29-
3022
// ensure the correct version of KGP ends up on our buildscript classpath
31-
// since build-plugins also has <some> version in its dependency closure
3223
alias(libs.plugins.kotlin.multiplatform) apply false
3324
alias(libs.plugins.kotlin.jvm) apply false
3425
}

codegen/protocol-tests/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionPath
88
import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionSrcDir
99

1010
plugins {
11-
kotlin("jvm") // FIXME - configuration doesn't resolve without this
12-
id("aws.sdk.kotlin.gradle.smithybuild")
11+
kotlin("jvm")
12+
alias(libs.plugins.aws.kotlin.repo.tools.smithybuild)
1313
}
1414

1515
description = "Smithy protocol test suite"

codegen/sdk/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import java.util.*
1616
import kotlin.streams.toList
1717

1818
plugins {
19-
kotlin("jvm") // FIXME - codegen configuration doesn't resolve without this
20-
id("aws.sdk.kotlin.gradle.smithybuild")
19+
kotlin("jvm")
20+
alias(libs.plugins.aws.kotlin.repo.tools.smithybuild)
2121
id("sdk-bootstrap")
2222
}
2323

gradle/libs.versions.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
kotlin-version = "1.9.21"
33
dokka-version = "1.9.10"
44

5-
aws-kotlin-repo-tools-version = "0.3.2"
5+
aws-kotlin-repo-tools-version = "0.4.0"
66

77
# libs
88
coroutines-version = "1.7.3"
@@ -14,7 +14,6 @@ smithy-kotlin-codegen-version = "0.30.13"
1414

1515
# codegen
1616
smithy-version = "1.42.0"
17-
smithy-gradle-version = "0.7.0"
1817

1918
# testing
2019
junit-version = "5.10.1"
@@ -26,6 +25,8 @@ slf4j-version = "2.0.9"
2625

2726

2827
[libraries]
28+
aws-kotlin-repo-tools-build-support = { module="aws.sdk.kotlin.gradle:build-support", version.ref = "aws-kotlin-repo-tools-version" }
29+
2930
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin-version"}
3031
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin-version"}
3132
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
9192
smithy-aws-cloudformation-traits = { module = "software.amazon.smithy:smithy-aws-cloudformation-traits", version.ref = "smithy-version" }
9293
smithy-model = { module = "software.amazon.smithy:smithy-model", version.ref = "smithy-version" }
9394
smithy-protocol-test-traits = { module = "software.amazon.smithy:smithy-protocol-test-traits", version.ref = "smithy-version" }
94-
smithy-gradle-plugin = { module = "software.amazon.smithy:smithy-gradle-plugin", version.ref = "smithy-gradle-version" }
9595
smithy-smoke-test-traits = { module = "software.amazon.smithy:smithy-smoke-test-traits", version.ref = "smithy-version" }
9696

9797
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 =
131131
kotlinx-benchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlinx-benchmark-version" }
132132
kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.13.2" }
133133
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin-version"}
134-
smithy-gradle = { id = "software.amazon.smithy", version.ref = "smithy-gradle-version" }
135-
aws-kotlin-repo-tools-kmp = { id = "aws.sdk.kotlin.kmp", version.ref = "aws-kotlin-repo-tools-version" }
134+
aws-kotlin-repo-tools-kmp = { id = "aws.sdk.kotlin.gradle.kmp", version.ref = "aws-kotlin-repo-tools-version" }
136135
aws-kotlin-repo-tools-smithybuild = { id = "aws.sdk.kotlin.gradle.smithybuild", version.ref = "aws-kotlin-repo-tools-version" }

services/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import java.time.LocalDateTime
1111
plugins {
1212
`maven-publish`
1313
alias(libs.plugins.dokka)
14+
alias(libs.plugins.aws.kotlin.repo.tools.kmp) apply false
1415
}
1516

1617
val sdkVersion: String by project
@@ -31,6 +32,7 @@ subprojects {
3132
apply {
3233
plugin("org.jetbrains.kotlin.multiplatform")
3334
plugin("org.jetbrains.dokka")
35+
plugin(libraries.plugins.aws.kotlin.repo.tools.kmp.get().pluginId)
3436
}
3537

3638
logger.info("configuring: $project")

tests/benchmarks/service-benchmarks/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing
66

77
plugins {
88
alias(libs.plugins.kotlin.multiplatform)
9+
alias(libs.plugins.aws.kotlin.repo.tools.kmp)
910
application
1011
}
1112

tests/codegen/event-stream/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionSrcDir
99

1010
plugins {
1111
alias(libs.plugins.kotlin.jvm)
12-
id("aws.sdk.kotlin.gradle.smithybuild")
12+
alias(libs.plugins.aws.kotlin.repo.tools.smithybuild)
1313
}
1414

1515
description = "Event stream codegen integration test suite"

0 commit comments

Comments
 (0)