Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

build.gradle 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. subprojects {
  2. def jgit = new org.mdonoughe.JGitDescribeTask()
  3. jgit.dir = new File(projectDir, '../.git')
  4. jgit.subdir = project.name
  5. project.version = jgit.getDescription() + '-SNAPSHOT'
  6. group = 'com.dmdirc.parser'
  7. apply plugin: 'maven-publish'
  8. apply plugin: 'java'
  9. sourceSets {
  10. main {
  11. java {
  12. srcDir 'src'
  13. }
  14. }
  15. test {
  16. java {
  17. srcDir 'test'
  18. }
  19. }
  20. }
  21. publishing {
  22. publications {
  23. mavenJava(MavenPublication) {
  24. artifact jar
  25. }
  26. }
  27. repositories {
  28. maven {
  29. name 'snapshots'
  30. url 'http://nexus.dmdirc.com/nexus/content/repositories/snapshots/'
  31. }
  32. }
  33. }
  34. sourceCompatibility = 1.7
  35. targetCompatibility = 1.7
  36. repositories.mavenCentral()
  37. dependencies {
  38. testCompile group: 'junit', name: 'junit', version: '4.+'
  39. testCompile group: 'org.mockito', name: 'mockito-all', version: '1.+'
  40. }
  41. task getCredentials << {
  42. def target = file('../nexus-teamcity.gradle')
  43. if (!target.exists()) {
  44. new URL('http://www.dmdirc.com/private/nexus-teamcity.gradle').withInputStream{
  45. i -> target.withOutputStream { it << i }
  46. }
  47. }
  48. apply from: '../nexus-teamcity.gradle'
  49. project.publishing.repositories[0].credentials {
  50. username "$nexusUser"
  51. password "$nexusPass"
  52. }
  53. }
  54. task publishSnapshot(dependsOn: ['getCredentials', 'publishMavenJavaPublicationToSnapshotsRepository']) << {
  55. }
  56. }
  57. task wrapper(type: Wrapper) {
  58. gradleVersion = '2.1'
  59. }
  60. def find(name) {
  61. if (allprojects.find { it.name == name }) {
  62. project(name)
  63. } else if (allprojects.find { it.name == 'parser:' + name }) {
  64. project('parser:' + name)
  65. } else if (allprojects.find { it.name == 'modules:parser:' + name }) {
  66. project('modules:parser:' + name)
  67. } else {
  68. println "Couldn't find project $name"
  69. }
  70. }
  71. buildscript {
  72. repositories {
  73. mavenCentral()
  74. maven {
  75. url 'http://nexus.dmdirc.com/nexus/content/repositories/thirdparty/'
  76. }
  77. }
  78. dependencies {
  79. classpath group: 'com.github.shanemcc', name: 'jgit-describe', version: '0.5'
  80. classpath group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '2.3.1.+'
  81. }
  82. }