Skip to content

Commit c4eceba

Browse files
committed
attemp to fix publishing release
1 parent 4cf70ac commit c4eceba

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

build.gradle.kts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,8 @@ jacoco {
1616
subprojectsOf("project") {
1717
apply {
1818
plugin("kotlin")
19-
plugin("maven-publish")
2019
plugin("kediatr-publishing")
2120
plugin("kediatr-coverage")
22-
plugin("java")
23-
}
24-
25-
java {
26-
withSourcesJar()
27-
withJavadocJar()
2821
}
2922

3023
dependencies {
@@ -42,13 +35,6 @@ subprojectsOf("project") {
4235
tasks.test {
4336
useJUnitPlatform()
4437
maxParallelForks = Runtime.getRuntime().availableProcessors()
45-
testLogging {
46-
showStandardStreams = true
47-
showCauses = true
48-
showStackTraces = true
49-
events("PASSED", "FAILED", "SKIPPED", "STANDARD_OUT")
50-
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
51-
}
5238
finalizedBy(tasks.named<Copy>("testAggregateResults"))
5339
}
5440

buildSrc/src/main/kotlin/kediatr-publishing.gradle.kts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import gradle.kotlin.dsl.accessors._b1c49aa8f7beb14ec3224fa8349d7c02.sourceSets
2-
31
plugins {
42
`maven-publish`
53
signing
4+
java
65
}
76
fun getProperty(
87
projectKey: String,
@@ -16,13 +15,17 @@ fun getProperty(
1615
}
1716

1817
afterEvaluate {
18+
java {
19+
withSourcesJar()
20+
withJavadocJar()
21+
}
1922
publishing {
2023
publications {
2124
create<MavenPublication>("publish-${project.name}") {
2225
groupId = rootProject.group.toString()
2326
version = rootProject.version.toString()
2427
artifactId = project.name
25-
from(components["java"])
28+
from(components["kotlin"])
2629
pom {
2730
name.set(project.name)
2831
description.set(project.properties["projectDescription"].toString())
@@ -60,6 +63,7 @@ afterEvaluate {
6063
val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
6164
val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
6265
url = if (rootProject.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
66+
// url = rootProject.buildDir.resolve("publications").toURI()
6367
credentials {
6468
username = getProperty("nexus_username", "nexus_username")
6569
password = getProperty("nexus_password", "nexus_password")

0 commit comments

Comments
 (0)