Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 130 lines (110 sloc) 2.743 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
apply plugin: 'java'
apply plugin: 'groovy'

version = '0.1'

repositories {
    flatDir(dirs: file('lib/opt'))
}

dependencies {
  compile fileTree('lib/core').matching { include '*.jar' }
  compile fileTree('lib/opt').matching {
    include '*.jar'
    exclude 'groovy-all-*.jar'
  }
  testCompile fileTree('lib/tests').matching { include '*.jar' }

  groovy module(':groovy-all:1.8.3')
}

sourceSets {
  test {
    java.srcDirs = [file('src/tests/java'), file('src/tests/testapps/java')]
    resources.srcDirs = [file('src/tests/java')]
  }
}

sourceCompatibility = "1.7"
targetCompatibility = "1.7"

jar {
  version = ''
}

test {
  useTestNG()
  include "**/*Test.class"
  exclude "**/redis/*.class"
  systemProperty "java.util.logging.config.file", "conf/logging.properties"
}

task rubyTests(type: Exec, dependsOn: testClasses) {
  group = 'verification'
  workingDir = file('src/tests/ruby')
  executable = file('src/tests/ruby/run_tests.sh')
}

task redisTests(type: Test, dependsOn: testClasses) {
    useTestNG()
    include("**/RedisTest.class")
}

task yardoc(type: Exec) {
    rubySrc = "src/main/ruby/core/**"
    vertxRbSrc = "src/main/ruby/vertx.rb"
    licenseSrc = "LICENSE.txt"
    readmeSrc = "README.md"
    destDir = "target/docs/ruby/api/"

    inputs.files licenseSrc, vertxRbSrc, readmeSrc
    inputs.dir rubySrc
    outputs.dir destDir

    commandLine = ["yardoc", "--title", "'vert.x Ruby API'", "--readme",
                   readmeSrc, "--no-private", "--output-dir", destDir,
                   vertxRbSrc, rubySrc, "-", licenseSrc]
}

distSpec = copySpec {
  into('lib/java') {
    from jar, configurations.compile
  }
  into('lib/ruby') {
    from 'src/main/ruby'
    include '**/*.rb'
  }
  into('lib/groovy') {
    from 'src/main/groovy'
    include '**/*.groovy'
  }
  into('conf') {
    from "conf/logging.properties", "conf/cluster.xml"
  }
  into('docs/java/api') {
    from javadoc
  }
  into('docs/groovy/api') {
    from groovydoc
  }
  into('docs/ruby/api') {
    from yardoc
  }
  into('bin') {
    from 'src/scripts/vertx'
    fileMode = 0755
  }
  into('examples') {
    from 'src/examples'
  }

  from 'LICENSE.txt', "README.md", "rel-notes/release-notes-${version}.txt"
}


task dist(type: Zip) {
  description = 'Builds the distribution.'
  group = 'build'
  into("$project.name-$version") {
    with distSpec
  }
}

task install(type: Sync) {
  with distSpec
  if (System.getenv()['VERTX_HOME']) {
    into System.getenv()['VERTX_HOME']
  }
  else {
    into System.getProperty('java.io.tmpdir') + '/vertx'
  }
}

task tarDist(type: Tar) {
  into("$project.name-$version") {
    with distSpec
  }
  compression = org.gradle.api.tasks.bundling.Compression.GZIP
}

task wrapper(type: Wrapper)
Something went wrong with that request. Please try again.