-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added gradle build #32
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
buildscript { | ||
repositories { | ||
maven { | ||
url "https://plugins.gradle.org/m2/" | ||
} | ||
} | ||
dependencies { | ||
classpath "gradle.plugin.io.vertx:vertx-gradle-plugin:0.0.8" | ||
} | ||
} | ||
|
||
|
||
apply plugin: 'java' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Vert.x Gradle plugin already applies it. |
||
|
||
group = 'io.vertx' | ||
version = '1.3.0-SNAPSHOT' | ||
|
||
description = """""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
|
||
sourceCompatibility = 1.8 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Already done by the Vert.x plugin. |
||
targetCompatibility = 1.8 | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = 'UTF-8' | ||
} | ||
|
||
|
||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
ext { | ||
vertVersion = '3.5.1' | ||
} | ||
|
||
dependencies { | ||
compile "io.vertx:vertx-core:$vertVersion" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, see the Vert.x plugin documentation, it simplifies dependencies management. |
||
compile "io.vertx:vertx-jdbc-client:$vertVersion" | ||
compile "io.vertx:vertx-service-proxy:$vertVersion" | ||
compile "io.vertx:vertx-codegen:$vertVersion" | ||
compile "io.vertx:vertx-web:$vertVersion" | ||
compile "io.vertx:vertx-web-client:$vertVersion" | ||
compile "io.vertx:vertx-web-templ-freemarker:$vertVersion" | ||
compile "com.github.rjeschke:txtmark:0.13" | ||
compile "ch.qos.logback:logback-classic:1.2.3" | ||
compile "org.hsqldb:hsqldb:2.3.4" | ||
testCompile 'junit:junit:4.12' | ||
testCompile "io.vertx:vertx-unit:$vertVersion" | ||
} | ||
|
||
|
||
sourceSets { | ||
generated { | ||
java.srcDir "${projectDir}/src/generated/java" | ||
} | ||
} | ||
|
||
task generateProxies(type: JavaCompile) { | ||
group = "build" | ||
description = "Generate Vert.x service proxies" | ||
|
||
source = sourceSets.main.java | ||
classpath = configurations.compile | ||
options.compilerArgs = [ | ||
"-proc:only", | ||
"-processor", "io.vertx.codegen.CodeGenProcessor", | ||
"-Acodegen.output=${projectDir}/src/main" | ||
] | ||
destinationDir = file("${projectDir}/src/generated/java") | ||
} | ||
|
||
compileJava { | ||
dependsOn generateProxies | ||
source += sourceSets.generated.java | ||
} | ||
|
||
clean { | ||
delete += sourceSets.generated.java.srcDirs | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could be using the simpler
plugins { ... }
block since there are no special dependencies.