Skip to content

Commit

Permalink
migrate remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
aajtodd committed Oct 4, 2023
1 parent 1155d38 commit 1a2aa75
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 61 deletions.
35 changes: 15 additions & 20 deletions aws-runtime/aws-config/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,34 @@ plugins {
description = "Support for AWS configuration"
extra["moduleName"] = "aws.sdk.kotlin.runtime.config"

val smithyKotlinVersion = libs.versions.smithy.kotlin.version.get()

apply(plugin = "kotlinx-atomicfu")

kotlin {
sourceSets {
commonMain {
dependencies {
api(project(":aws-runtime:aws-core"))
api("aws.smithy.kotlin:aws-credentials:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:http:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:http-auth:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:telemetry-api:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:http-client-engine-default:$smithyKotlinVersion")
api(libs.smithy.kotlin.aws.credentials)
implementation(libs.smithy.kotlin.http)
implementation(libs.smithy.kotlin.http.auth)
implementation(libs.smithy.kotlin.telemetry.api)
implementation(libs.smithy.kotlin.http.client.engine.default)
implementation(project(":aws-runtime:aws-http"))

// parsing common JSON credentials responses
implementation("aws.smithy.kotlin:serde-json:$smithyKotlinVersion")
implementation(libs.smithy.kotlin.serde.json)

// additional dependencies required by generated sts provider
implementation("aws.smithy.kotlin:http-client:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:serde-form-url:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:serde-xml:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:aws-xml-protocols:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:aws-protocol-core:$smithyKotlinVersion")
// additional dependencies required by generated clients
implementation(libs.bundles.smithy.kotlin.service.client)
implementation(project(":aws-runtime:aws-endpoint"))
implementation("aws.smithy.kotlin:aws-signing-common:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:aws-signing-default:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:http-auth-aws:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:telemetry-defaults:$smithyKotlinVersion")

// additional dependencies required by generated sts provider
implementation(libs.smithy.kotlin.serde.xml)
implementation(libs.smithy.kotlin.serde.formurl)
implementation(libs.smithy.kotlin.aws.xml.protocols)

// additional dependencies required by generated sso provider(s)
implementation("aws.smithy.kotlin:aws-json-protocols:$smithyKotlinVersion")
implementation(libs.smithy.kotlin.aws.json.protocols)

// atomics
implementation(libs.kotlinx.atomicfu)
Expand All @@ -56,7 +51,7 @@ kotlin {
commonTest {
dependencies {
implementation(libs.kotlinx.coroutines.test)
implementation("aws.smithy.kotlin:http-test:$smithyKotlinVersion")
implementation(libs.smithy.kotlin.http.test)
implementation(libs.kotlinx.serialization.json)
implementation(libs.mockk)
}
Expand Down
6 changes: 2 additions & 4 deletions aws-runtime/aws-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ description = "AWS client runtime core"
extra["displayName"] = "AWS :: SDK :: Kotlin :: Client Runtime"
extra["moduleName"] = "aws.sdk.kotlin.runtime"

val smithyKotlinVersion = libs.versions.smithy.kotlin.version.get()

kotlin {
sourceSets {
commonMain {
dependencies {
api("aws.smithy.kotlin:runtime-core:$smithyKotlinVersion")
api("aws.smithy.kotlin:smithy-client:$smithyKotlinVersion")
api(libs.smithy.kotlin.runtime.core)
api(libs.smithy.kotlin.smithy.client)
}
}

Expand Down
4 changes: 2 additions & 2 deletions aws-runtime/aws-endpoint/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ kotlin {
dependencies {
implementation(project(":aws-runtime:aws-core"))
// exposes Endpoint
api("aws.smithy.kotlin:http-client:$smithyKotlinVersion")
api("aws.smithy.kotlin:aws-signing-common:$smithyKotlinVersion")
api(libs.smithy.kotlin.http.client)
api(libs.smithy.kotlin.aws.signing.common)
}
}

Expand Down
6 changes: 3 additions & 3 deletions aws-runtime/aws-http/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ kotlin {
dependencies {
api(project(":aws-runtime:aws-core"))
api(project(":aws-runtime:aws-endpoint"))
api("aws.smithy.kotlin:aws-signing-common:$smithyKotlinVersion")
api("aws.smithy.kotlin:http-client:$smithyKotlinVersion")
api(libs.smithy.kotlin.aws.signing.common)
api(libs.smithy.kotlin.http.client)
}
}

commonTest {
dependencies {
implementation(libs.kotlinx.coroutines.test)
implementation("aws.smithy.kotlin:http-test:$smithyKotlinVersion")
api(libs.smithy.kotlin.http.test)
}
}

Expand Down
1 change: 0 additions & 1 deletion aws-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ subprojects {
dependencies {
implementation(libraries.kotest.assertions.core.jvm)
implementation(libraries.slf4j.simple)

}
}
}
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ plugins {
alias(libs.plugins.dokka)
}


// configures (KMP) subprojects with our own KMP conventions and some default dependencies
apply(plugin = "aws.sdk.kotlin.kmp")

Expand Down
2 changes: 0 additions & 2 deletions codegen/smithy-aws-kotlin-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ val kotlinJVMTargetVersion: String by project

dependencies {


implementation(libs.kotlin.stdlib.jdk8)
api(libs.smithy.kotlin.codegen)

Expand All @@ -34,7 +33,6 @@ dependencies {
testImplementation(libs.kotlin.test.junit5)
testImplementation(libs.smithy.kotlin.codegen.testutils)


testImplementation(libs.slf4j.api)
testImplementation(libs.slf4j.simple)
testImplementation(libs.kotlinx.serialization.json)
Expand Down
45 changes: 44 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,31 @@ kotlinx-coroutines-slf4j = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j-version" }
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j-version" }

smithy-kotlin-aws-credentials = { module = "aws.smithy.kotlin:aws-credentials", version.ref = "smithy-kotlin-version" }
smithy-kotlin-aws-event-stream = { module = "aws.smithy.kotlin:aws-event-stream", version.ref = "smithy-kotlin-version" }
smithy-kotlin-aws-signing-common = { module = "aws.smithy.kotlin:aws-signing-common", version.ref = "smithy-kotlin-version" }
smithy-kotlin-aws-signing-default = { module = "aws.smithy.kotlin:aws-signing-default", version.ref = "smithy-kotlin-version" }
smithy-kotlin-runtime-core = { module = "aws.smithy.kotlin:runtime-core", version.ref = "smithy-kotlin-version" }
smithy-kotlin-smithy-client = { module = "aws.smithy.kotlin:smithy-client", version.ref = "smithy-kotlin-version" }
smithy-kotlin-smithy-test = { module = "aws.smithy.kotlin:smithy-test", version.ref = "smithy-kotlin-version" }
smithy-kotlin-identity-api = { module = "aws.smithy.kotlin:identity-api", version.ref = "smithy-kotlin-version" }
smithy-kotlin-http = { module = "aws.smithy.kotlin:http", version.ref = "smithy-kotlin-version" }
smithy-kotlin-http-auth = { module = "aws.smithy.kotlin:http-auth", version.ref = "smithy-kotlin-version" }
smithy-kotlin-http-auth-aws = { module = "aws.smithy.kotlin:http-auth-aws", version.ref = "smithy-kotlin-version" }
smithy-kotlin-http-client = { module = "aws.smithy.kotlin:http-client", version.ref = "smithy-kotlin-version" }
smithy-kotlin-http-client-engine-default = { module = "aws.smithy.kotlin:http-client-engine-default", version.ref = "smithy-kotlin-version" }
smithy-kotlin-http-client-engine-crt = { module = "aws.smithy.kotlin:http-client-engine-crt", version.ref = "smithy-kotlin-version" }
smithy-kotlin-http-test = { module = "aws.smithy.kotlin:http-test", version.ref = "smithy-kotlin-version" }
smithy-kotlin-serde-core = { module = "aws.smithy.kotlin:serde", version.ref = "smithy-kotlin-version" }
smithy-kotlin-serde-json = { module = "aws.smithy.kotlin:serde-json", version.ref = "smithy-kotlin-version" }
smithy-kotlin-serde-xml = { module = "aws.smithy.kotlin:serde-xml", version.ref = "smithy-kotlin-version" }
smithy-kotlin-serde-formurl = { module = "aws.smithy.kotlin:serde-form-url", version.ref = "smithy-kotlin-version" }
smithy-kotlin-aws-protocol-core = { module = "aws.smithy.kotlin:aws-protocol-core", version.ref = "smithy-kotlin-version" }
smithy-kotlin-aws-xml-protocols = { module = "aws.smithy.kotlin:aws-xml-protocols", version.ref = "smithy-kotlin-version" }
smithy-kotlin-aws-json-protocols = { module = "aws.smithy.kotlin:aws-json-protocols", version.ref = "smithy-kotlin-version" }
smithy-kotlin-telemetry-api = { module = "aws.smithy.kotlin:telemetry-api", version.ref = "smithy-kotlin-version" }
smithy-kotlin-telemetry-defaults = { module = "aws.smithy.kotlin:telemetry-defaults", version.ref = "smithy-kotlin-version" }

smithy-kotlin-codegen = { module = "software.amazon.smithy.kotlin:smithy-kotlin-codegen", version.ref = "smithy-kotlin-version" }
smithy-kotlin-codegen-testutils = { module = "software.amazon.smithy.kotlin:smithy-kotlin-codegen-testutils", version.ref = "smithy-kotlin-version" }

Expand All @@ -67,7 +92,25 @@ kotlinx-benchmark-runtime = { module = "org.jetbrains.kotlinx:kotlinx-benchmark-
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-version" }
mockk = { module = "io.mockk:mockk", version.ref = "mockk-version" }


[bundles]
# bundle of smithy-kotlin dependencies all AWS service clients have
smithy-kotlin-service-client = [
"smithy-kotlin-runtime-core",
"smithy-kotlin-smithy-client",
"smithy-kotlin-http-client",
"smithy-kotlin-http-client-engine-default",
"smithy-kotlin-http",
"smithy-kotlin-http-auth",
"smithy-kotlin-http-auth-aws",
"smithy-kotlin-aws-protocol-core",
"smithy-kotlin-serde-core",
"smithy-kotlin-aws-signing-common",
"smithy-kotlin-aws-signing-default",
"smithy-kotlin-identity-api",
"smithy-kotlin-aws-credentials",
"smithy-kotlin-telemetry-api",
"smithy-kotlin-telemetry-defaults",
]

[plugins]
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka-version"}
Expand Down
2 changes: 0 additions & 2 deletions gradle/sdk-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import java.util.Properties
buildscript {
repositories {
mavenLocal()
Expand All @@ -21,7 +20,6 @@ repositories {
gradlePluginPortal()
}


dependencies {
implementation(libs.smithy.gradle.plugin)
implementation(libs.smithy.model)
Expand Down
1 change: 0 additions & 1 deletion gradle/sdk-plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ dependencyResolutionManagement {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.provideDelegate
import org.gradle.kotlin.dsl.register
import software.amazon.smithy.gradle.tasks.SmithyBuild
import software.amazon.smithy.model.node.Node
Expand Down
4 changes: 1 addition & 3 deletions tests/benchmarks/service-benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ val requiredServices = setOf(
)

val missingServices = requiredServices.filterNot { rootProject.file("services/$it/build.gradle.kts").exists() }
val smithyKotlinVersion = libs.versions.smithy.kotlin.version.get()

if (missingServices.isEmpty()) {
val optinAnnotations = listOf("kotlin.RequiresOptIn", "aws.smithy.kotlin.runtime.InternalApi")
Expand All @@ -43,12 +42,11 @@ if (missingServices.isEmpty()) {

commonMain {
dependencies {
api("aws.smithy.kotlin:runtime-core:$smithyKotlinVersion")
api(libs.smithy.kotlin.runtime.core)
implementation(project(":aws-runtime:aws-core"))
implementation(libs.kotlinx.atomicfu)
implementation(libs.kotlinx.coroutines.core)


requiredServices.forEach { implementation(project(":services:$it")) }
}
}
Expand Down
26 changes: 8 additions & 18 deletions tests/codegen/event-stream/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ val generateProjectionsTask = tasks.named<SmithyBuild>("generateSmithyProjection
addCompileClasspath = true

// ensure the generated tests use the same version of the runtime as the aws aws-runtime
val smithyKotlinVersion: String by project
val smithyKotlinVersion = libs.versions.smithy.kotlin.version.get()
doFirst {
System.setProperty("smithy.kotlin.codegen.clientRuntimeVersion", smithyKotlinVersion)
}
Expand Down Expand Up @@ -127,8 +127,6 @@ tasks.test {
}
}

val smithyKotlinVersion = libs.versions.smithy.kotlin.version.get()

dependencies {

implementation(libs.kotlinx.coroutines.core)
Expand All @@ -137,30 +135,22 @@ dependencies {
testImplementation(libs.kotlin.test.junit5)
testImplementation(libs.kotlinx.coroutines.test)

testImplementation("aws.smithy.kotlin:smithy-test:$smithyKotlinVersion")
testImplementation("aws.smithy.kotlin:aws-signing-default:$smithyKotlinVersion")
testImplementation("aws.smithy.kotlin:telemetry-api:$smithyKotlinVersion")
testImplementation(libs.smithy.kotlin.smithy.test)
testImplementation(libs.smithy.kotlin.aws.signing.default)
testImplementation(libs.smithy.kotlin.telemetry.api)

// have to manually add all the dependencies of the generated client(s)
// doing it this way (as opposed to doing what we do for protocol-tests) allows
// the tests to work without a publish to maven-local step at the cost of maintaining
// this set of dependencies manually
// <-- BEGIN GENERATED DEPENDENCY LIST -->
implementation("aws.smithy.kotlin:aws-credentials:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:aws-event-stream:$smithyKotlinVersion")
implementation(libs.bundles.smithy.kotlin.service.client)
implementation(libs.smithy.kotlin.aws.event.stream)
implementation(project(":aws-runtime:aws-http"))
implementation("aws.smithy.kotlin:aws-protocol-core:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:aws-json-protocols:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:aws-signing-common:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:http-auth-aws:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:http:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:http-client-engine-default:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:telemetry-defaults:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:serde:$smithyKotlinVersion")
implementation("aws.smithy.kotlin:serde-json:$smithyKotlinVersion")
implementation(libs.smithy.kotlin.aws.json.protocols)
implementation(libs.smithy.kotlin.serde.json)
api(project(":aws-runtime:aws-config"))
api(project(":aws-runtime:aws-core"))
api(project(":aws-runtime:aws-endpoint"))
api("aws.smithy.kotlin:runtime-core:$smithyKotlinVersion")
// <-- END GENERATED DEPENDENCY LIST -->
}
4 changes: 2 additions & 2 deletions tests/e2e-test-util/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ description = "Test utilities for integration and e2e tests"
val smithyKotlinVersion = libs.versions.smithy.kotlin.version.get()

dependencies {
api("aws.smithy.kotlin:http-client-engine-default:$smithyKotlinVersion")
api("aws.smithy.kotlin:http-client-engine-crt:$smithyKotlinVersion")
api(libs.smithy.kotlin.http.client.engine.default)
api(libs.smithy.kotlin.http.client.engine.crt)
}

0 comments on commit 1a2aa75

Please sign in to comment.