File tree Expand file tree Collapse file tree 2 files changed +36
-5
lines changed
Expand file tree Collapse file tree 2 files changed +36
-5
lines changed Original file line number Diff line number Diff line change @@ -138,11 +138,7 @@ subprojects { project ->
138138 ext. isTestSuite = project. name. startsWith(" grace-test-suite" )
139139 ext. isCiBuild = project. hasProperty(" isCiBuild" ) || System . getenv(). get(" CI" ) as Boolean
140140 ext. pomInfo = {
141- if (project. name == ' grace-gradle-plugin' ) {
142- delegate. name " Grace Gradle Plugin"
143- delegate. description " Grace Framework : A Gradle plugin for Grace which provides a bunch of useful plugins"
144- }
145- else {
141+ if (project. name != ' grace-gradle-plugin' ) {
146142 def projectName = project. name. split(' -' )* . capitalize(). join(' ' )
147143 delegate. name projectName
148144 delegate. description " Grace Framework : $projectName "
Original file line number Diff line number Diff line change @@ -130,3 +130,38 @@ tasks.withType(Copy) {
130130tasks. withType(io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository ). configureEach {
131131 shouldRunAfter(tasks. withType(Sign ))
132132}
133+
134+ if (isReleaseVersion) {
135+ afterEvaluate {
136+ signing {
137+ required { isReleaseVersion && gradle. taskGraph. hasTask(" publish" ) }
138+ Publication [] publications = new Publication [publishing. publications. size()]
139+ publishing. publications. findAll(). toArray(publications)
140+ sign(publications)
141+ }
142+ }
143+
144+ tasks. withType(Sign ) {
145+ onlyIf { isReleaseVersion }
146+ }
147+ }
148+
149+ project. afterEvaluate {
150+ project. publishing. publications. each { publication ->
151+ if (publication instanceof MavenPublication ) {
152+ publication. pom {
153+ if (publication. name == " maven" || publication. name == " pluginMaven" ) {
154+ name = " Grace Gradle Plugin"
155+ description = " Grace Framework : A Gradle plugin for Grace which provides a bunch of useful plugins"
156+ }
157+
158+ if (publication. name == " pluginMaven" || publication. name. endsWith(" PluginMarkerMaven" )) {
159+ withXml {
160+ def xml = asNode()
161+ xml. children(). last() + pomInfo
162+ }
163+ }
164+ }
165+ }
166+ }
167+ }
You can’t perform that action at this time.
0 commit comments