Skip to content

Commit

Permalink
Try to fix tag task dependency, ensure group is set for published art…
Browse files Browse the repository at this point in the history
…ifacts
  • Loading branch information
serpro69 committed Sep 8, 2024
1 parent 9bb5d86 commit ea7c374
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
11 changes: 9 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import io.github.serpro69.semverkt.gradle.plugin.tasks.TagTask
import utils.configureGradleDaemonJvm

plugins {
Expand All @@ -10,8 +11,6 @@ plugins {
group = "io.github.serpro69"

subprojects {
group = rootProject.group

apply {
plugin("com.github.ben-manes.versions")
}
Expand Down Expand Up @@ -41,6 +40,14 @@ nexusPublishing {
}
}

// Run :tag only after we've published artifacts to sonatype
tasks.withType<TagTask>().configureEach {
// don't apply when "dryRun"
findProperty("dryRun") ?: run {
dependsOn("closeSonatypeStagingRepository")
}
}

apiValidation {
ignoredProjects += listOf("bom", "cli-bot", /*"docs",*/ "test")
}
Expand Down
3 changes: 1 addition & 2 deletions buildSrc/src/main/kotlin/faker-kotlin-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ plugins {
id("org.jetbrains.dokka")
}

group = rootProject.group.toString()
val lib = project.libs

dependencies {
Expand Down Expand Up @@ -55,7 +54,7 @@ tasks.withType<JavaCompile> {
}

tasks.withType<Test> {
@Suppress("SimpleRedundantLet", "UNNECESSARY_SAFE_CALL")
@Suppress("SimpleRedundantLet")
jvmArgs?.let { it.plus("-ea") }

useJUnitPlatform()
Expand Down
9 changes: 1 addition & 8 deletions buildSrc/src/main/kotlin/faker-pub-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import io.github.serpro69.semverkt.gradle.plugin.tasks.TagTask
plugins {
`maven-publish`
signing
id("faker-base-conventions")
}

publishing {
Expand Down Expand Up @@ -86,11 +87,3 @@ tasks.withType<Sign>().configureEach {
onlyIf { !isDev.get() && !isSnapshot.get() }
onlyIf { isRelease.get() }
}

//// Run :tag only after we've published artifacts to sonatype
//tasks.withType<TagTask>().configureEach {
// // don't apply when "dryRun"
// findProperty("dryRun") ?: run {
// dependsOn(rootProject.tasks.getByName("closeSonatypeStagingRepository"))
// }
//}

0 comments on commit ea7c374

Please sign in to comment.