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 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. group = 'com.dmdirc'
  2. apply plugin: 'com.dmdirc.git-version'
  3. apply plugin: 'java'
  4. apply plugin: 'maven-publish'
  5. apply plugin: 'jacoco'
  6. apply plugin: 'com.github.kt3k.coveralls'
  7. sourceSets {
  8. main {
  9. java.srcDirs = ['src']
  10. resources.srcDirs = ['res']
  11. }
  12. test {
  13. java.srcDirs = ['test']
  14. resources.srcDirs = ['test-res']
  15. }
  16. }
  17. sourceCompatibility = 1.8
  18. targetCompatibility = 1.8
  19. repositories.mavenCentral()
  20. dependencies {
  21. compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.0'
  22. testCompile group: 'junit', name: 'junit', version: '4.12'
  23. testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.17'
  24. testCompile group: 'com.google.jimfs', name: 'jimfs', version: '1.0'
  25. }
  26. // DMDirc uses 18.0, JimFS has a transient dep on 16.0.1 - force the newer version
  27. configurations.all {
  28. resolutionStrategy.force('com.google.guava:guava:18.0')
  29. }
  30. publishing {
  31. publications {
  32. mavenJava(MavenPublication) {
  33. from components.java
  34. artifact sourcesJar { classifier 'sources' }
  35. artifact javadocJar { classifier 'javadoc' }
  36. }
  37. }
  38. repositories {
  39. maven {
  40. name 'snapshots'
  41. url 'http://artifactory.dmdirc.com/artifactory/repo'
  42. }
  43. }
  44. }
  45. task wrapper(type: Wrapper) {
  46. gradleVersion = '2.2.1'
  47. }
  48. task publishSnapshot(dependsOn: 'publishMavenJavaPublicationToSnapshotsRepository') << {
  49. }
  50. buildscript {
  51. repositories {
  52. mavenCentral()
  53. maven { url 'http://artifactory.dmdirc.com/artifactory/repo' }
  54. maven { url 'https://dl.bintray.com/dmdirc/releases/' }
  55. }
  56. dependencies {
  57. classpath group: 'com.dmdirc', name: 'git-version', version: '1.0'
  58. classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.1.0'
  59. }
  60. }
  61. jacocoTestReport {
  62. reports {
  63. xml.enabled = true // coveralls plugin depends on xml format report
  64. html.enabled = true
  65. }
  66. }
  67. task javadocJar(type: Jar) {
  68. classifier = 'javadoc'
  69. from javadoc
  70. }
  71. task sourcesJar(type: Jar) {
  72. classifier = 'sources'
  73. from sourceSets.main.allSource
  74. }