Skip to content

Commit

Permalink
Merge branch 'main' of github.com:awslabs/aws-kotlin-repo-tools into …
Browse files Browse the repository at this point in the history
…ktlint-upgrade
  • Loading branch information
lauzadis committed Jun 25, 2024
2 parents dd50396 + 42f729f commit b00efff
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 17 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ To cut a new release:
7. Specify the tag you created under `Source Version`.
8. Start the build.

## Projects
## Development

### Local development
To use a local version of the plugin in downstream projects (such as `smithy-kotlin` or `aws-sdk-kotlin`):
1. Run `./gradlew -Prelease.version=<YOUR_SNAPSHOT_VERSION> publishToMavenLocal`
2. Consume the snapshot plugin version in the projects

### Project Structure

* `:build-plugins:build-support` - common build support (publishing, linting, utils, etc)
* `:build-plugins:kmp-conventions` - Plugin that applies common conventions for KMP projects (source sets, targets, etc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ internal abstract class AnalyzeArtifactSizeMetrics : DefaultTask() {
val release = releaseMetrics[artifact] ?: 0

val delta = current - release
val percentage = if (current == 0L || release == 0L) Double.NaN else delta.toDouble() / release.toDouble() * 100
val percentage = if (release == 0L) Double.NaN else delta.toDouble() / release.toDouble() * 100

ArtifactSizeMetric(
current,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ internal abstract class PutArtifactSizeMetricsInCloudWatch : DefaultTask() {
unit = StandardUnit.Bytes
value = artifactSize
dimensions = listOf(
Dimension {
name = "Version"
value = "${pluginConfig.projectRepositoryName}-$releaseTag"
},
Dimension {
name = "Project"
value = pluginConfig.projectRepositoryName
Expand Down
2 changes: 1 addition & 1 deletion build-plugins/kmp-conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories {

dependencies {
implementation(project(":build-plugins:build-support"))
compileOnly(kotlin("gradle-plugin", "1.9.20"))
compileOnly(kotlin("gradle-plugin", "2.0.0"))
testImplementation(libs.junit.jupiter)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,29 @@ fun Project.configureKmpTargets() {
// see https://kotlinlang.org/docs/multiplatform-hierarchy.html#see-the-full-hierarchy-template
kmpExt.applyDefaultHierarchyTemplate {
if (hasJvmAndNative) {
group("jvmAndNative") {
withJvm()
withNative()
common {
group("jvmAndNative") {
withJvm()
withNative()
}
}
}

if (hasWindows) {
group("windows") {
withMingw()
common {
group("windows") {
withMingw()
}
}
}

if (hasDesktop) {
group("desktop") {
withLinux()
withMingw()
withMacos()
common {
group("desktop") {
withLinux()
withMingw()
withMacos()
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlin.code.style=official

# kotlin
kotlinVersion=1.9.10
kotlinVersion=2.0.0

0 comments on commit b00efff

Please sign in to comment.