[aerogear-dev] Unified Push Java client

Karel Piwko kpiwko at redhat.com
Tue Mar 25 13:12:22 EDT 2014


On Tue, 25 Mar 2014 09:37:01 -0700 (PDT)
oxsav <vmfamaral at gmail.com> wrote:

> My build.gradle has this content:
> 
> /apply plugin: 'java'
> apply plugin: 'eclipse'
> apply plugin: 'idea'
> 
> defaultTasks = ['assemble']
> 
> sourceCompatibility = '1.7'
> targetCompatibility = '1.7'
> 
> configurations {
>   provided
> }
> 
> repositories {
>   //maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
>   mavenCentral()
> }
> 
> dependencies {
>   provided "org.vert-x:vertx-core:$vertxVersion"
>   provided "org.vert-x:vertx-platform:$vertxVersion"
> 
>   testCompile "org.vert-x:vertx-lang-java:$vertxVersion"
>   testCompile( "org.vert-x:vertx-testframework:$vertxVersion" ) {
>     transitive = false
>   }
>   testCompile "junit:junit:$junitVersion"
> 
>   // Libraries needed to run the scala tools
>   //scalaTools "org.scala-lang:scala-compiler:$scalaVersion"
>   //scalaTools "org.scala-lang:scala-library:$scalaVersion"
> 
>   // Libraries needed for scala api
>   //compile "org.scala-lang:scala-library:$scalaVersion"
> 
>   compile "org.jboss.aerogear:unifiedpush-java-client:0.5.0"
>   compile "org.jboss.resteasy:resteasy-jackson-provider:2.3.2.Final"
>   
> }
> 
> sourceSets {
>   main {
>     compileClasspath = compileClasspath + configurations.provided

Is the line above correct? According to
http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.SourceSet.html
default value is project.configurations.compile

What happens if you alter or remove this line altogether?

>   }
> }
> 
> task copyMod( type:Copy, dependsOn: 'classes' ) {
>   into "build/copyMod/$modulename-v$version"
>   from 'build/classes/main'
>   from 'src/main/conf'
>   into( 'lib' ) {
>     from configurations.compile
>   }
> }
> 
> task prepareVertxTest(type: Sync, dependsOn: ['copyMod']) {
>   from 'build/copyMod'
>   into 'build/tmp/mod-test'
> }
> 
> test {
>   // Can't have the app on the vert.x classpath
>   classpath = files( classpath.findAll {
>     !( it.toString() ==~ /.+build\/(classes|resources)\/main$/ )
>   } )
> 
>   // Some vert.x properties
>   systemProperty 'vertx.test.timeout', 15
>   systemProperty 'vertx.mods', "$projectDir/build/tmp/mod-test"
>   systemProperty 'vertx.version', "$project.version"
>   systemProperty 'module.name', "$modulename-v$version"
> 
>   // Dump output
>   testLogging.showStandardStreams = true
> 
>   // No idea why we need to depend on testClasses...
>   dependsOn << [ 'testClasses', 'copyMod', 'prepareVertxTest' ]
> }
> 
> task collectDeps(type: Copy) {
>   group = 'vert.x'
>   description = 'conveniently collect dependencies for other IDEs'
>   destinationDir = file("build/deps")
>   into("compile") {
>     from configurations.compile
>   }
>   into("test") {
>     from configurations.testCompile
>   }
> }
> 
> // Package into build/libs/mod.zip
> task dist( type: Zip, dependsOn: 'copyMod' ) {
>   group = 'vert.x'
>   description = "Assembles a vert.x module in 'mod.zip' format"
>   destinationDir = project.file('build/libs')
>   archiveName = 'mod.zip'
>   from project.file("build/copyMod")
> }
> 
> task release( type: Copy, dependsOn: ['dist', 'jar'] ) {
>   group = 'vert.x'
>   description = "Builds the module for use in the module repository into
> mods/$modulename-v$version"
>   destinationDir = project.file('build/release')
>   into ("$modulename-v$version") {
>     from 'build/libs/mod.zip'
>     from 'README.md'
>   }
> }
> 
> task install(type: Copy, dependsOn: 'copyMod') {
>   try {
>     destinationDir = new File(System.getenv()['VERTX_MODS'])
>   } catch(NullPointerException e) {
>   }
>   from 'build/copyMod'
> }
> /
> 
> Anything that I'm missing?
> 
> 
> 
> --
> View this message in context:
> http://aerogear-dev.1069024.n5.nabble.com/Unified-Push-Java-client-tp7087p7095.html
> Sent from the aerogear-dev mailing list archive at Nabble.com.
> _______________________________________________ aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev



More information about the aerogear-dev mailing list