Skip to content

Commit 12b0e99

Browse files
committed
everything looks ok minus testing of new task via repo tools
1 parent ddf25f5 commit 12b0e99

File tree

4 files changed

+31120
-40
lines changed

4 files changed

+31120
-40
lines changed

bom/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ publishing {
114114
artifactId = "version-catalog"
115115
description = "Provides a version catalog"
116116
from(components["versionCatalog"])
117+
118+
/*
119+
Creates a dummy JAR for version catalog publishing
120+
The `version-catalog` plugin doesn't generate one because it isn't needed but JReleaser requires a jar to be present in the version catalog component
121+
https://docs.gradle.org/current/userguide/version_catalogs.html#sec:version-catalog-plugin
122+
123+
Consuming published version catalogs with the dummy JAR still work
124+
https://docs.gradle.org/current/userguide/version_catalogs.html#sec:importing-published-catalog
125+
*/
126+
artifact(tasks["versionCatalogJar"])
117127
}
118128
}
119129
}

build.gradle.kts

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
import aws.sdk.kotlin.gradle.dsl.configureLinting
6-
//import aws.sdk.kotlin.gradle.dsl.configureJReleaser
6+
import aws.sdk.kotlin.gradle.dsl.configureJReleaser
77
import aws.sdk.kotlin.gradle.util.typedProp
8-
import org.jreleaser.model.Active
98

109
buildscript {
1110
// NOTE: buildscript classpath for the root project is the parent classloader for the subprojects, we
@@ -14,6 +13,12 @@ buildscript {
1413
classpath(libs.kotlinx.atomicfu.plugin)
1514
// Add our custom gradle build logic to buildscript classpath
1615
classpath(libs.aws.kotlin.repo.tools.build.support)
16+
/*
17+
Enforce jackson to a version supported both by dokka and jreleaser:
18+
https://github.com/Kotlin/dokka/issues/3472#issuecomment-1929712374
19+
https://github.com/Kotlin/dokka/issues/3194#issuecomment-1929382630
20+
*/
21+
classpath(enforcedPlatform("com.fasterxml.jackson:jackson-bom:2.15.3"))
1722
}
1823
}
1924

@@ -23,7 +28,6 @@ plugins {
2328
id(libs.plugins.kotlin.multiplatform.get().pluginId) apply false
2429
id(libs.plugins.kotlin.jvm.get().pluginId) apply false
2530
alias(libs.plugins.aws.kotlin.repo.tools.artifactsizemetrics)
26-
id("org.jreleaser") version "1.18.0"
2731
}
2832

2933
artifactSizeMetrics {
@@ -79,42 +83,8 @@ dependencies {
7983
dokka(project(":hll"))
8084
}
8185

82-
allprojects {
83-
// throw Exception(configurations.toString())
84-
// configurations.forEach {
85-
// println(it.name)
86-
// }
87-
configurations.all {
88-
resolutionStrategy.eachDependency {
89-
if (requested.group.contains("com.fasterxml.jackson")) {
90-
useVersion("2.15.3")
91-
}
92-
}
93-
}
94-
}
95-
96-
97-
// TODO: Use `gr jreleaserDeploy`
98-
jreleaser {
99-
project {
100-
version = "0.0.1"
101-
}
102-
signing {
103-
active = Active.ALWAYS
104-
armored = true
105-
}
106-
deploy {
107-
maven {
108-
mavenCentral {
109-
create("maven-central") {
110-
active = Active.ALWAYS
111-
url = "https://central.sonatype.com/api/v1/publisher"
112-
stagingRepository(rootProject.layout.buildDirectory.dir("m2").get().toString())
113-
}
114-
}
115-
}
116-
}
117-
}
86+
// Publishing
87+
configureJReleaser()
11888

11989
// Code Style
12090
val lintPaths = listOf(

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ksp-version = "2.1.0-1.0.29" # Keep in sync with kotlin-version
44

55
dokka-version = "2.0.0"
66

7-
aws-kotlin-repo-tools-version = "0.0.1"
7+
aws-kotlin-repo-tools-version = "0.4.31-SNAPSHOT"
88

99
# libs
1010
coroutines-version = "1.9.0"

0 commit comments

Comments
 (0)