pom.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright 2012 the original author or authors.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Source: https://github.com/ratpack/ratpack/blob/master/gradle/pom.gradle
  17. ext {
  18. pomModifications = []
  19. modifyPom = { pomModifications << it }
  20. }
  21. tasks.withType(Upload).configureEach {
  22. repositories.withType(org.gradle.api.artifacts.maven.MavenResolver) {
  23. it.pom.whenConfigured { pom ->
  24. pomModifications.each {
  25. configure(pom, it)
  26. }
  27. }
  28. }
  29. }
  30. modifyPom {
  31. dependencies.removeAll { it.scope == "test" }
  32. }
  33. modifyPom {
  34. project {
  35. name project.name
  36. description project.description
  37. url "https://github.com/datadog/dd-trace-java"
  38. licenses {
  39. license {
  40. name "The Apache Software License, Version 2.0"
  41. url "http://www.apache.org/licenses/LICENSE-2.0.txt"
  42. distribution "repo"
  43. }
  44. }
  45. scm {
  46. connection "scm:https://datadog@github.com/datadog/dd-trace-java"
  47. developerConnection "scm:git@github.com:datadog/dd-trace-java.git"
  48. url "https://github.com/datadog/dd-trace-java"
  49. }
  50. developers {
  51. developer {
  52. id "datadog"
  53. name "Datadog"
  54. }
  55. }
  56. }
  57. }