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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. sonar {
  2. properties {
  3. property 'sonar.projectName', "${projectTitle} :: Scanner :: Protocol"
  4. property 'sonar.exclusions', 'src/main/java/org/sonar/scanner/protocol/viewer/**'
  5. }
  6. }
  7. dependencies {
  8. // please keep the list ordered
  9. api 'com.google.code.gson:gson'
  10. api 'com.google.protobuf:protobuf-java'
  11. api 'commons-io:commons-io'
  12. api 'commons-lang:commons-lang'
  13. api project(':sonar-core')
  14. compileOnlyApi 'com.google.code.findbugs:jsr305'
  15. testImplementation 'com.google.guava:guava'
  16. testImplementation 'junit:junit'
  17. testImplementation 'org.assertj:assertj-core'
  18. }
  19. //create a single Jar with all dependencies
  20. task fatJar(type: Jar) {
  21. manifest {
  22. attributes 'Main-Class': 'org.sonar.scanner.protocol.viewer.ScannerReportViewerApp'
  23. }
  24. archiveBaseName = project.name + '-all'
  25. from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
  26. with jar
  27. duplicatesStrategy = DuplicatesStrategy.EXCLUDE
  28. }
  29. build.dependsOn fatJar
  30. // Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
  31. tasks.withType(JavaCompile) {
  32. options.release = 11
  33. }
  34. // Used by sonar-db-core to run DB Unit Tests
  35. artifactoryPublish.skip = false
  36. publishing {
  37. publications {
  38. mavenJava(MavenPublication) {
  39. from components.java
  40. if (release) {
  41. artifact sourcesJar
  42. artifact javadocJar
  43. }
  44. }
  45. }
  46. }