@@ -25,23 +25,48 @@ tasks.named("generateChangelog") {
2525 previousRevision = project. ext. ' shipkit-auto-version.previous-tag'
2626 githubToken = System . getenv(" GITHUB_TOKEN" )
2727 repository = " linkedin/iceberg"
28-
29- // Make generateChangelog depend on all necessary subproject tasks
30- subprojects. each { subproject ->
31- // Compilation tasks
32- dependsOn subproject. tasks. withType(JavaCompile )
33-
34- // Documentation tasks
35- dependsOn subproject. tasks. withType(Javadoc )
36-
37- // Publication tasks
38- dependsOn subproject. tasks. matching { it. name == ' generatePomFileForJavaLibraryPublication' }
39-
40- // Resource processing tasks
41- dependsOn subproject. tasks. withType(ProcessResources )
28+ // Write changelog into the root build directory to avoid broad root-dir overlaps
29+ outputFile = file(" ${ buildDir} /CHANGELOG.md" )
30+ }
31+
32+ // Ensure Gradle knows ordering relative to tasks that write inside the repository
33+ // to avoid implicit dependency validation errors in Gradle 8+
34+ gradle. projectsEvaluated {
35+ def genTaskProvider = tasks. named(" generateChangelog" )
36+ genTaskProvider. configure { t ->
37+ // Ensure we run after root task that writes to root build output
38+ t. mustRunAfter(rootProject. tasks. matching { it. name == ' generateGitProperties' })
39+
40+ rootProject. subprojects. each { prj ->
41+ // Run after resource processing tasks
42+ t. mustRunAfter(prj. tasks. matching { it. name == ' processResources' })
43+ t. mustRunAfter(prj. tasks. matching { it. name == ' processTestResources' })
44+
45+ // Run after Java compilation tasks
46+ t. mustRunAfter(prj. tasks. matching { it. name == ' compileJava' })
47+ t. mustRunAfter(prj. tasks. matching { it. name == ' compileTestJava' })
48+
49+ // Run after documentation and archive tasks that may touch repo files
50+ t. mustRunAfter(prj. tasks. withType(org.gradle.api.tasks.javadoc.Javadoc ))
51+ t. mustRunAfter(prj. tasks. withType(org.gradle.api.tasks.bundling.Jar ))
52+
53+ // Run after any POM generation tasks created by maven-publish
54+ t. mustRunAfter(prj. tasks. withType(org.gradle.api.publish.maven.tasks.GenerateMavenPom ))
55+
56+ // Run after module metadata tasks, if present
57+ t. mustRunAfter(prj. tasks. matching { it. name. startsWith(' generateMetadataFileFor' ) })
58+
59+ // Run after signing tasks (from 'signing' plugin)
60+ t. mustRunAfter(prj. tasks. matching { it. name. startsWith(' sign' ) })
61+
62+ // Run after publish tasks to avoid implicit dependency warnings in release pipelines
63+ t. mustRunAfter(prj. tasks. matching { it. name. startsWith(' publish' ) })
64+ }
4265 }
4366}
4467
68+
69+
4570apply plugin : " org.shipkit.shipkit-github-release" // https://github.com/shipkit/shipkit-changelog
4671tasks. named(" githubRelease" ) {
4772 def genTask = tasks. named(" generateChangelog" ). get()
@@ -59,12 +84,11 @@ nexusPublishing {
5984 sonatype {
6085 username = System . getenv(" SONATYPE_USER" )
6186 password = System . getenv(" SONATYPE_PWD" )
62- nexusUrl. set(uri(" https://s01.oss.sonatype.org/service/local/" ))
63- snapshotRepositoryUrl. set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
87+ nexusUrl. set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
88+ // nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
89+ snapshotRepositoryUrl. set(uri(" https://central.sonatype.com/repository/maven-snapshots/" ))
90+ // snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
6491 }
6592 }
6693 }
67- transitionCheckOptions {
68- maxRetries. set(100 )
69- }
7094}
0 commit comments