From 3a87a324f523369977707feabee8e8b8acd2dd41 Mon Sep 17 00:00:00 2001 From: Luis Trigueiros Date: Sun, 18 Mar 2018 19:04:34 +0000 Subject: [PATCH 1/2] Added gradle build Initial idea implementation support for gradle build --- step-4/build.gradle | 80 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 step-4/build.gradle diff --git a/step-4/build.gradle b/step-4/build.gradle new file mode 100644 index 0000000..c801fc8 --- /dev/null +++ b/step-4/build.gradle @@ -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' + +group = 'io.vertx' +version = '1.3.0-SNAPSHOT' + +description = """""" + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + + + +repositories { + jcenter() +} + +ext { + vertVersion = '3.5.1' +} + +dependencies { + compile "io.vertx:vertx-core:$vertVersion" + 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 +} From 7b3e49f52a80c8f799e53bd21d478f9e7572bc03 Mon Sep 17 00:00:00 2001 From: Luis Trigueiros Date: Mon, 19 Mar 2018 11:06:01 +0000 Subject: [PATCH 2/2] clean up after review --- step-4/build.gradle | 50 +++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 36 deletions(-) diff --git a/step-4/build.gradle b/step-4/build.gradle index c801fc8..350a452 100644 --- a/step-4/build.gradle +++ b/step-4/build.gradle @@ -1,52 +1,30 @@ -buildscript { - repositories { - maven { - url "https://plugins.gradle.org/m2/" - } - } - dependencies { - classpath "gradle.plugin.io.vertx:vertx-gradle-plugin:0.0.8" - } +plugins { + id 'io.vertx.vertx-plugin' version '0.0.8' } - -apply plugin: 'java' - -group = 'io.vertx' -version = '1.3.0-SNAPSHOT' - -description = """""" - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -tasks.withType(JavaCompile) { - options.encoding = 'UTF-8' -} - - +description = "Service proxy generation example" repositories { jcenter() } -ext { - vertVersion = '3.5.1' -} dependencies { - compile "io.vertx:vertx-core:$vertVersion" - 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 "io.vertx:vertx-jdbc-client" + compile "io.vertx:vertx-service-proxy" + compile "io.vertx:vertx-codegen" + compile "io.vertx:vertx-web" + compile "io.vertx:vertx-web-client" + compile "io.vertx:vertx-web-templ-freemarker" 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" + testCompile "io.vertx:vertx-unit" +} + +vertx { + mainVerticle = 'io.vertx.guides.wiki.MainVerticle' }