Advertisement
Guest User

Untitled

a guest
Mar 12th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. maven { url 'http://localhost:8081/artifactory/gradle-dev' }
  4. }
  5. dependencies {
  6. classpath 'org.standardout:bnd-platform:1.2.0'
  7. classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4+"
  8. }
  9. }
  10.  
  11. apply plugin: 'org.standardout.bnd-platform'
  12. apply plugin: "com.jfrog.artifactory"
  13. apply plugin: 'maven-publish'
  14.  
  15. group = 'com.google.code.gson'
  16. version = '2.8.0'
  17.  
  18. publishing {
  19. publications {
  20. osgiBundles(MavenPublication) {
  21. artifacts {
  22. files("build/plugins")
  23. }
  24. }
  25. }
  26. }
  27.  
  28. artifactory {
  29. contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver
  30.  
  31. publish {
  32. repository {
  33. repoKey = 'gradle-dev-local'
  34. username = "${artifactory_user}"
  35. password = "${artifactory_password}"
  36. maven = true
  37. }
  38.  
  39. defaults {
  40. publications ('osgiBundles')
  41. }
  42.  
  43. }
  44.  
  45. resolve {
  46. repository {
  47. repoKey = 'gradle-dev'
  48. username = "${artifactory_user}"
  49. password = "${artifactory_password}"
  50. maven = true
  51. }
  52. }
  53.  
  54. }
  55.  
  56. platform {
  57. useBndHashQualifiers = false
  58. defaultQualifier = ''
  59. bundle(group: 'com.google.code.gson', name:'gson', version:'2.8.0') {
  60. bnd {
  61. instruction 'Export-Package', 'com.google.gson,com.google.gson.stream,com.google.gson.annotations,com.google.gson.reflect'
  62. }
  63. }
  64. }
  65.  
  66. gradle artifactoryPublish
  67. :generatePomFileForOsgiBundlesPublication
  68. :artifactoryPublish
  69. Deploying artifact: http://localhost:8081/artifactory/gradle-dev-local/com/google/code/gson/bundle-jars/2.8.0/bundle-jars-2.8.0.pom
  70. Deploying build descriptor to: http://localhost:8081/artifactory/api/build
  71. Build successfully deployed. Browse it in Artifactory under http://localhost:8081/artifactory/webapp/builds/bundle-jars/1489323863518
  72.  
  73. +- com
  74. +--- google/code/gson/bundle-jars
  75. |+-- 2.8.0
  76. | +- bundle-jars.pom
  77. +--- maven-metadata.xml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement