1
0

build.gradle 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. allprojects {
  2. apply plugin: 'java-library'
  3. apply plugin: 'maven-publish'
  4. compileJava.options.encoding = 'UTF-8'
  5. compileTestJava.options.encoding = 'UTF-8'
  6. sourceCompatibility = JavaVersion.VERSION_11
  7. targetCompatibility = JavaVersion.VERSION_11
  8. version 'v3.2.0'
  9. group 'eu.qunn.git.poesty'
  10. repositories {
  11. mavenCentral()
  12. maven { url "https://jitpack.io" }
  13. }
  14. afterEvaluate {
  15. publishing {
  16. publications {
  17. mavenJava(MavenPublication) {
  18. from components.java
  19. }
  20. }
  21. }
  22. }
  23. ext {
  24. nanojsonVersion = "1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751"
  25. spotbugsVersion = "4.6.0"
  26. junitVersion = "5.8.2"
  27. checkstyleVersion = "9.3" // do not use latest version (10.0) as it requires compile JDK 11
  28. }
  29. }
  30. dependencies {
  31. api project(':extractor')
  32. implementation project(':timeago-parser')
  33. }
  34. subprojects {
  35. task sourcesJar(type: Jar, dependsOn: classes) {
  36. archiveClassifier.set('sources')
  37. from sourceSets.main.allSource
  38. }
  39. tasks.withType(Test) {
  40. testLogging {
  41. events "skipped", "failed"
  42. showStandardStreams = true
  43. exceptionFormat = 'full'
  44. }
  45. }
  46. artifacts {
  47. archives sourcesJar
  48. }
  49. }
  50. // https://discuss.gradle.org/t/best-approach-gradle-multi-module-project-generate-just-one-global-javadoc/18657/21
  51. task aggregatedJavadocs(type: Javadoc, group: 'Documentation') {
  52. destinationDir = file("$buildDir/docs/javadoc")
  53. title = "$project.name $version"
  54. // options.memberLevel = JavadocMemberLevel.PRIVATE
  55. options.links 'https://docs.oracle.com/javase/8/docs/api/'
  56. options.encoding 'UTF-8'
  57. // Fixes unknown tag @implNote; the other two were added precautionary
  58. options.tags = [
  59. "apiNote:a:API Note:",
  60. "implSpec:a:Implementation Requirements:",
  61. "implNote:a:Implementation Note:"
  62. ]
  63. subprojects.each { project ->
  64. project.tasks.withType(Javadoc).each { javadocTask ->
  65. source += javadocTask.source
  66. classpath += javadocTask.classpath
  67. excludes += javadocTask.excludes
  68. includes += javadocTask.includes
  69. }
  70. }
  71. }