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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. plugins {
  2. id 'com.dmdirc.git-version' version '1.0'
  3. id 'com.github.kt3k.coveralls' version '2.6.3'
  4. }
  5. group = 'com.dmdirc'
  6. apply plugin: 'java'
  7. apply plugin: 'maven-publish'
  8. apply plugin: 'jacoco'
  9. apply plugin: 'idea'
  10. idea {
  11. module {
  12. sourceDirs += file('src/main/generated')
  13. testSourceDirs += file('src/test/generated_tests')
  14. generatedSourceDirs = [file('src/main/generated'), file('src/test/generated_tests')]
  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.1'
  22. compile group: 'com.google.auto.value', name: 'auto-value', version: '1.2'
  23. compile group: 'com.google.guava', name:'guava', version: '19.0'
  24. testCompile group: 'junit', name: 'junit', version: '4.12'
  25. testCompile group: 'org.mockito', name: 'mockito-core', version: '1.10.19'
  26. testCompile group: 'com.google.jimfs', name: 'jimfs', version: '1.1'
  27. }
  28. // DMDirc uses 19.0, JimFS has a transient dep on 16.0.1 - force the newer version
  29. configurations.all {
  30. resolutionStrategy.force('com.google.guava:guava:19.0')
  31. }
  32. publishing {
  33. publications {
  34. mavenJava(MavenPublication) {
  35. from components.java
  36. artifact sourcesJar { classifier 'sources' }
  37. artifact javadocJar { classifier 'javadoc' }
  38. }
  39. }
  40. repositories {
  41. maven {
  42. name 'snapshots'
  43. url 'http://artifactory.dmdirc.com/artifactory/snapshots'
  44. credentials {
  45. username System.getenv('ARTIFACTORY_USER')
  46. password System.getenv('ARTIFACTORY_PASSWORD')
  47. }
  48. }
  49. }
  50. }
  51. task wrapper(type: Wrapper) {
  52. gradleVersion = '2.13'
  53. }
  54. task publishSnapshot(dependsOn: 'publishMavenJavaPublicationToSnapshotsRepository') << {
  55. }
  56. jacocoTestReport {
  57. reports {
  58. xml.enabled = true // coveralls plugin depends on xml format report
  59. html.enabled = true
  60. }
  61. }
  62. task javadocJar(type: Jar) {
  63. classifier = 'javadoc'
  64. from javadoc
  65. }
  66. task sourcesJar(type: Jar) {
  67. classifier = 'sources'
  68. from sourceSets.main.allSource
  69. }