Skip to content

Commit

Permalink
refactor: upstream plugin changes (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
aajtodd authored Feb 5, 2024
1 parent 5465077 commit b235044
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 15 deletions.
12 changes: 3 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ import aws.sdk.kotlin.gradle.util.typedProp
buildscript {
// NOTE: buildscript classpath for the root project is the parent classloader for the subprojects, we
// only need to add e.g. atomic-fu and build-plugins here for imports and plugins to be available in subprojects.
// NOTE: Anything included in the root buildscript classpath is added to the classpath for all projects!
dependencies {
classpath(libs.kotlinx.atomicfu.plugin)
// Add our custom gradle build logic to buildscript classpath
classpath(libs.aws.kotlin.repo.tools.build.support)
}
}

Expand All @@ -21,15 +24,6 @@ plugins {
// since build-plugins also has <some> version in its dependency closure
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.jvm) apply false

// Add our custom gradle plugin(s) to buildscript classpath
// NOTE: Anything included in our build plugin is added to the classpath for all projects,
// this includes bundled plugins and their versions. As an example the smithy gradle base
// plugin is used by the smithybuild plugin which means you can't apply it with a different
// version directly because it's already on the classpath.
//
// Plugin configures (KMP) subprojects with our own KMP conventions and some default dependencies
alias(libs.plugins.aws.kotlin.repo.tools.kmp)
}

val testJavaVersion = typedProp<String>("test.java.version")?.let {
Expand Down
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -32,6 +32,8 @@ jsoup-version = "1.16.2"


[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" }
Expand Down Expand Up @@ -95,5 +97,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"}
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" }
2 changes: 2 additions & 0 deletions runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.dokka)
alias(libs.plugins.aws.kotlin.repo.tools.kmp) apply false
jacoco
}

Expand All @@ -24,6 +25,7 @@ subprojects {
apply {
plugin("org.jetbrains.kotlin.multiplatform")
plugin("org.jetbrains.dokka")
plugin(libraries.plugins.aws.kotlin.repo.tools.kmp.get().pluginId)
}

configurePublishing("smithy-kotlin")
Expand Down
1 change: 1 addition & 0 deletions tests/benchmarks/aws-signing-benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing
plugins {
kotlin("multiplatform")
alias(libs.plugins.kotlinx.benchmark)
alias(libs.plugins.aws.kotlin.repo.tools.kmp)
}

skipPublishing()
Expand Down
1 change: 1 addition & 0 deletions tests/benchmarks/channel-benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing
plugins {
kotlin("multiplatform")
alias(libs.plugins.kotlinx.benchmark)
alias(libs.plugins.aws.kotlin.repo.tools.kmp)
}

skipPublishing()
Expand Down
1 change: 1 addition & 0 deletions tests/benchmarks/http-benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing
plugins {
kotlin("multiplatform")
alias(libs.plugins.kotlinx.benchmark)
alias(libs.plugins.aws.kotlin.repo.tools.kmp)
}

skipPublishing()
Expand Down
3 changes: 2 additions & 1 deletion tests/benchmarks/serde-benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing
plugins {
kotlin("multiplatform")
alias(libs.plugins.kotlinx.benchmark)
id("aws.sdk.kotlin.gradle.smithybuild")
alias(libs.plugins.aws.kotlin.repo.tools.smithybuild)
alias(libs.plugins.aws.kotlin.repo.tools.kmp)
}

skipPublishing()
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/nullability-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing

plugins {
alias(libs.plugins.kotlin.jvm)
id("aws.sdk.kotlin.gradle.smithybuild")
alias(libs.plugins.aws.kotlin.repo.tools.smithybuild)
}

skipPublishing()
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/paginator-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing

plugins {
alias(libs.plugins.kotlin.jvm)
id("aws.sdk.kotlin.gradle.smithybuild")
alias(libs.plugins.aws.kotlin.repo.tools.smithybuild)
}

skipPublishing()
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/waiter-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import aws.sdk.kotlin.gradle.dsl.skipPublishing

plugins {
alias(libs.plugins.kotlin.jvm)
id("aws.sdk.kotlin.gradle.smithybuild")
alias(libs.plugins.aws.kotlin.repo.tools.smithybuild)
}

skipPublishing()
Expand Down

0 comments on commit b235044

Please sign in to comment.