Skip to content

Commit

Permalink
fix: initialization order (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
aajtodd authored Mar 18, 2021
1 parent b8d5d82 commit b0c22ea
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ object AwsKotlinDependency {
}

// remap aws-sdk-kotlin dependencies to project notation
private val sameProjectDeps = mapOf(
AwsKotlinDependency.AWS_CLIENT_RT_CORE to """project(":client-runtime:aws-client-rt")""",
AwsKotlinDependency.AWS_CLIENT_RT_HTTP to """project(":client-runtime:protocols:http")""",
AwsKotlinDependency.AWS_CLIENT_RT_AUTH to """project(":client-runtime:auth")""",
AwsKotlinDependency.AWS_CLIENT_RT_REGIONS to """project(":client-runtime:regions")""",
AwsKotlinDependency.AWS_CLIENT_RT_JSON_PROTOCOLS to """project(":client-runtime:protocols:aws-json-protocols")"""
)
// NOTE: the lazy wrapper is required here, see: https://github.com/awslabs/aws-sdk-kotlin/issues/95
private val sameProjectDeps: Map<KotlinDependency, String> by lazy {
mapOf(
AwsKotlinDependency.AWS_CLIENT_RT_CORE to """project(":client-runtime:aws-client-rt")""",
AwsKotlinDependency.AWS_CLIENT_RT_HTTP to """project(":client-runtime:protocols:http")""",
AwsKotlinDependency.AWS_CLIENT_RT_AUTH to """project(":client-runtime:auth")""",
AwsKotlinDependency.AWS_CLIENT_RT_REGIONS to """project(":client-runtime:regions")""",
AwsKotlinDependency.AWS_CLIENT_RT_JSON_PROTOCOLS to """project(":client-runtime:protocols:aws-json-protocols")"""
)
}

internal fun KotlinDependency.dependencyNotation(allowProjectNotation: Boolean = true): String {
val dep = this
Expand Down

0 comments on commit b0c22ea

Please sign in to comment.