You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * This module is building the zip file containing the static web site
  3. */
  4. sonarqube {
  5. skipProject = true
  6. }
  7. group = 'com.sonarsource.sonarqube'
  8. clean.doFirst {
  9. delete "${project.buildDir}/public/"
  10. }
  11. yarn_run {
  12. environment = [ GATSBY_DOCS_VERSION: version ]
  13. inputs.property('version', version)
  14. inputs.dir('src').withPathSensitivity(PathSensitivity.RELATIVE)
  15. ['gatsby-config.js', 'gatsby-node.js', 'package.json', 'yarn.lock', 'tsconfig.json'].each {
  16. inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
  17. }
  18. outputs.dir('public')
  19. outputs.cacheIf { true }
  20. args = ['build']
  21. }
  22. task "yarn_lint-report"() {
  23. }
  24. task zip(type: Zip) {
  25. def archiveDir = "$version"
  26. duplicatesStrategy DuplicatesStrategy.EXCLUDE
  27. baseName "sonar-docs"
  28. into("${archiveDir}") {
  29. from tasks.getByName('yarn_run').outputs
  30. }
  31. }
  32. zip.dependsOn yarn_run
  33. assemble.dependsOn zip
  34. publishing {
  35. publications {
  36. docs(MavenPublication) {
  37. artifactId 'sonar-docs'
  38. artifact zip
  39. }
  40. }
  41. }
  42. artifactory {
  43. publish {
  44. contextUrl = System.getenv('ARTIFACTORY_URL')
  45. repository {
  46. repoKey = System.getenv('ARTIFACTORY_DEPLOY_REPO_PRIVATE')
  47. username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME_PRIVATE')
  48. password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD_PRIVATE')
  49. }
  50. }
  51. }
  52. artifactoryPublish {
  53. skip = false
  54. publishPom = false
  55. publications(publishing.publications.docs)
  56. }