@@ -26,6 +26,8 @@ allprojects {
2626 version = scmVersion. version
2727}
2828
29+ println " Building version $version "
30+
2931tasks. named(" generateChangelog" ) {
3032 previousRevision = scmVersion. previousVersion
3133 githubToken = System . getenv(" GITHUB_TOKEN" )
@@ -59,13 +61,31 @@ nexusPublishing {
5961 }
6062}
6163
62- if (version. endsWith(" -SNAPSHOT" )) {
64+ def isSnapshot = version. endsWith(" -SNAPSHOT" )
65+
66+ if (isSnapshot) {
67+ println " Building a -SNAPSHOT version (Github release and Maven Central tasks are skipped)"
6368 tasks. named(" githubRelease" ) {
64- // snapshot versions do not produce changelog / GitHub releases
69+ // snapshot versions do not produce changelog / Github releases
6570 enabled = false
6671 }
6772 tasks. named(" closeAndReleaseStagingRepository" ) {
6873 // snapshot binaries are available in Sonatype without the need to close the staging repo
6974 enabled = false
7075 }
76+ }
77+
78+ tasks. register(" releaseSummary" ) {
79+ doLast {
80+ if (isSnapshot) {
81+ println " RELEASE SUMMARY\n " +
82+ " SNAPSHOTS released to: https://s01.oss.sonatype.org/content/repositories/snapshots/org/mockito/kotlin/mockito-kotlin\n " +
83+ " Release to Maven Central: SKIPPED FOR SNAPSHOTS\n " +
84+ " Github releases: SKIPPED FOR SNAPSHOTS"
85+ } else {
86+ println " RELEASE SUMMARY\n " +
87+ " Release to Maven Central (available after delay): https://repo1.maven.org/maven2/org/mockito/kotlin/mockito-kotlin/\n " +
88+ " Github releases: https://github.com/mockito/mockito-kotlin/releases"
89+ }
90+ }
7191}
0 commit comments