|
| 1 | +apply from: "gradle/vertx.gradle" |
| 2 | + |
| 3 | +/* |
| 4 | +Usage: |
| 5 | +
|
| 6 | +./gradlew task_name |
| 7 | +
|
| 8 | +(or gradlew.bat task_name if you have the misfortune to have to use Windows) |
| 9 | +
|
| 10 | +If no task name is specified then the default task 'assemble' is run |
| 11 | +
|
| 12 | +Task names are: |
| 13 | +
|
| 14 | +idea - generate a skeleton IntelliJ IDEA project |
| 15 | +
|
| 16 | +eclipse - generate a skeleton Eclipse IDE project |
| 17 | +
|
| 18 | +assemble - builds the outputs, by default this is the module zip file. It can also include a jar file if produceJar |
| 19 | + in gradle.properties is set to true. Outputs are created in build/libs. |
| 20 | + if pullInDeps in gradle.properties is set to 'true' then the modules dependencies will be |
| 21 | + automatically pulled into a nested mods directory inside the module during the build |
| 22 | +
|
| 23 | +copyMod - builds and copies the module to the local 'mods' directory so you can execute vertx runmod (etc) |
| 24 | + directly from the command line |
| 25 | +
|
| 26 | +modZip - creates the module zip into build/libs |
| 27 | +
|
| 28 | +clean - cleans everything up |
| 29 | +
|
| 30 | +test - runs the tests. An nice html test report is created in build/reports/tests (index.html) |
| 31 | +
|
| 32 | +runMod - runs the module. This is similar to executing vertx runmod from the command line except that it does |
| 33 | + not use the version of Vert.x installed and on the PATH to run it. Instead it uses the version of Vert.x |
| 34 | + that the module was compiled and tested against. |
| 35 | +
|
| 36 | +pullInDeps - pulls in all dependencies of the module into a nested module directory |
| 37 | +
|
| 38 | +uploadArchives - upload the module zip file (and jar if one has been created) to Nexus. You will need to |
| 39 | + configure sonatypeUsername and sonatypePassword in ~/.gradle/gradle.properties. |
| 40 | +
|
| 41 | +install - install any jars produced to the local Maven repository (.m2) |
| 42 | +
|
| 43 | + */ |
| 44 | + |
| 45 | +dependencies { |
| 46 | + /* |
| 47 | + Add your module jar dependencies here |
| 48 | + E.g. |
| 49 | + compile "com.foo:foo-lib:1.0.1" - for compile time deps - this will end up in your module too! |
| 50 | + testCompile "com.foo:foo-lib:1.0.1" - for test time deps |
| 51 | + provided "com.foo:foo-lib:1.0.1" - if you DON'T want it to be packaged in the module zip |
| 52 | + */ |
| 53 | + |
| 54 | + // If you're creating Groovy compiled verticles you may need the following dependencies |
| 55 | + provided "org.codehaus.groovy:groovy-all:$groovyVersion" |
| 56 | + provided "io.vertx:lang-groovy:$groovyLangModVersion@jar" |
| 57 | + |
| 58 | +} |
| 59 | + |
| 60 | +test { |
| 61 | + /* Configure which tests are included |
| 62 | + include 'org/foo/**' |
| 63 | + exclude 'org/boo/**' |
| 64 | + */ |
| 65 | + |
| 66 | +} |
| 67 | + |
| 68 | +/* |
| 69 | +If you're uploading stuff to Maven, Gradle needs to generate a POM. |
| 70 | +Please edit the details below. |
| 71 | + */ |
| 72 | +def configurePom(def pom) { |
| 73 | + pom.project { |
| 74 | + name rootProject.name |
| 75 | + description 'Description of your module here' |
| 76 | + inceptionYear '2013' |
| 77 | + packaging 'jar' |
| 78 | + |
| 79 | + url 'Your project url' |
| 80 | + |
| 81 | + developers { |
| 82 | + developer { |
| 83 | + id 'developer id (e.g. github username)' |
| 84 | + name 'developer name' |
| 85 | + email 'developer email' |
| 86 | + } |
| 87 | + } |
| 88 | + |
| 89 | + scm { |
| 90 | + url 'url to your repo - e.g. github repo url' |
| 91 | + } |
| 92 | + |
| 93 | + licenses { |
| 94 | + license { |
| 95 | + name 'The name of the license used, e.g.: The Apache Software License, Version 2.0' |
| 96 | + url 'URl to the license, e.g.: http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 97 | + distribution 'repo' |
| 98 | + } |
| 99 | + } |
| 100 | + |
| 101 | + properties { |
| 102 | + setProperty('project.build.sourceEncoding', 'UTF8') |
| 103 | + } |
| 104 | + } |
| 105 | +} |
0 commit comments