@@ -4,11 +4,22 @@ group = 'com.onemillionworlds'
44// --- Central Publisher API staging (no network) ---
55ext. centralPortalStagingDir = file(" ${ buildDir} /central-portal-staging" )
66
7+ // Clean the staging repo to avoid stale artifacts from previous runs
8+ tasks. register(' cleanCentralPortalStaging' , Delete ) {
9+ group = ' publishing'
10+ description = ' Deletes the local Central Portal staging directory.'
11+ delete centralPortalStagingDir
12+ }
13+
14+ clean. dependsOn cleanCentralPortalStaging
15+
16+
717// Aggregate task to publish all subproject publications to the local staging repo
818tasks. register(' publishAllToCentralPortalStaging' ) {
919 group = ' publishing'
1020 description = ' Publishes all module publications to the local Central Portal staging directory.'
1121 dependsOn(
22+ ' cleanCentralPortalStaging' ,
1223 ' :tamarin-core:publishMavenJavaPublicationToCentralPortalStagingRepository' ,
1324 ' :tamarin-desktop:publishMavenJavaPublicationToCentralPortalStagingRepository' ,
1425 ' :tamarin-android:publishReleasePublicationToCentralPortalStagingRepository'
@@ -20,6 +31,7 @@ tasks.register('zipCentralPortalBundle', Zip) {
2031 group = ' publishing'
2132 description = ' Zips the Central Portal staging directory into build/central-bundle.zip'
2233 dependsOn ' publishAllToCentralPortalStaging'
34+ mustRunAfter ' cleanCentralPortalStaging'
2335 from(centralPortalStagingDir)
2436 archiveFileName = ' central-bundle.zip'
2537 destinationDirectory = file(" ${ buildDir} " )
0 commit comments