Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

Published Info Does Not Apply to Maven POM in Gradle 5.x with Plugins 1.x #36

Closed
romeara opened this issue Jul 3, 2019 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@romeara
Copy link
Member

romeara commented Jul 3, 2019

The application of the data from the publishedInfo DSL to the Maven POM for publication does not apply when plug-in version 1.0.0 is applied to a Gradle 5 project. This appears to be because of changes to the Maven POM DSL.

@romeara romeara added the bug label Jul 3, 2019
@romeara romeara added this to the next-release milestone Jul 3, 2019
@romeara romeara self-assigned this Jul 3, 2019
@romeara
Copy link
Member Author

romeara commented Jul 3, 2019

A workaround may be used to manually apply the data until the plug-ins update to Gradle 5.0+ and can be fixed:

publishing {
    publications {
        publications.withType(MavenPublication.class).all{ pub ->
            pub.pom {
                url = "${publishedInfo.url}"
                licenses {
                    publishedInfo.licenses.each { lic ->
                        license {
                            name = "${lic.name}"
                            url = "${lic.url}"
                            distribution = "${lic.distribution}"
                        }
                    }
                }
                developers {
                    publishedInfo.developers.each{ dev ->
                        developer {
                            id = "${dev.id}"
                            name = "${dev.name}"
                            email = "${dev.url}"
                        }
                    }
                }
                scm {
                    connection = "${publishedInfo.scm.connection}"
                    developerConnection = "${publishedInfo.scm.developerConnection}"
                    url = "${publishedInfo.scm.url}"
                }
            }
        }
    }
}

@romeara romeara closed this as completed in 881f0bd Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant