I have a project using Gradle as the build tool and I have to make use of the Java ant task. One of the sub elements in this task is a reference to a classpath and I would like to use refid. The build script uses Gradle's WAR plugin. Since the compile task works without any problem I know that the classpath is set up correctly:
depende...
What does another build tool targeted at Java really get me?
If you use Gradle over another tool, why?
(See also Why use Buildr instead of Ant or Maven)
...
I am really tired of struggling with Maven 2 all the time. Build tools should not be in the way. Recently I have been looking at Buildr and Gradle. Maven 3 seems to fix some of the struggles. So, what should I go for now? Buildr? Gradle? Or wait a year for Maven 3?
...
I need to sign a jar after the jar task is being done in gradle. I have a need to reference the produced jar file from the build, and I can create recreate the jar file, but I really look for a property that does this for me.
Here is how I've done it:
jar.doLast {
jarfile = project.libsDir.path + File.separator + project.Name + '-' ...
Using Gradle 0.8, I have the following file structure
source/
stuff/
file.txt
empty/
Which I want copied to create
target/
stuff/
file.txt
empty/
So I tried this:
def sourceTree = fileTree(dir: 'source')
def targetDir = file(dir: 'target')
copy {
from sourceTree
into targetDir
}
But instead I en...
I'm creating Maven 2 archetypes for our project (Weld). I would like to be able to control which files are placed into the generated project based on the value of a property that is defined during archetype:generate. For instance, I foresee the following prompt:
Define value for groupId: : com.example
Define value for artifactId: : mypr...
we use Gradle for building Java projects and at the moment we have Ivy repositories to store third-party artifacts and also to publish our own artifacts into (repo is build using Gant scripts and the Ivy ANT tasks). but repo management is basic.
Gradle is able to work with a maven repo as well, so switching to a Maven artifact manager l...
I'd like to find a simple, non-trivial Java project that is expressed in terms of Ant + Ivy, Maven, Gant, and Gradle. I'm not interested in each tool's varied sample demos.
Where can I find such an example, for reference?
...
Hi all,
I have a complex gradle script that wraps up a load of functionality around building and deploying a number of netbeans projects to a number of environments.
The script works very well, but in essence it is all configured through half a dozen maps holding project and environment information.
I want to abstract the tasks away i...
In Gradle you need to define subprojects to be built in a 'settings.gradle' file. To build three child projects, you would do something like this:
include "child1", "child2", "child3"
The problem I'm having is that I have quite a few projects to include. Is there a way to use a wildcard in this definition? I'm looking for something li...
What's the best way to create a gradle task, which runs a groovy script? I realize that gradle build files are groovy, so I would think it would be possible to do something like this:
task run << {
Script app = new GroovyShell().parse(new File("examples/foo.groovy"))
// or replace .parse() w/ a .evalulate()?
app.run()
}
I...
As noted in the documentation, Gradle uses a directed acyclic graph (DAG) to build a dependency graph. From my understanding, having separate cycles for evaluation and execution is a major feature for a build tool. e.g. The Gradle doc states that this enables some features that would otherwise be impossible.
I'm interested in real-world...
We have several independent builds (each independent build is a multi-project build). The main build scripts become quite big as we have a set of common tasks reused by subprojects as well as there is a lot of repeation between indepedent builds. What we are looking for is:
A way to split main build file
into smaller files
A way to reu...
Hi,
currently, I'm testing Gradle as an alternative to Maven. In my projects, there are some 3rd party jars, which aren't available in any (Maven) repositories. My problem is now, how could I manage it to install these jars into my local .gradle repository. (If it's possible, I don't want to use the local Maven repository, because Gradl...
A)
task build << {
description = "Build task."
ant.echo('build')
}
B)
task build {
description = "Build task."
ant.echo('build')
}
I notice that with type B, the code within the task seems to be executed when typing gradle -t - ant echoes out 'build' even when just listing all the various available tasks. The description is als...
Dear All:
Sorry this is probably a very simple question.
I am using gradle http://www.gradle.org/ for my development environment. It works quite well!
I have written a simple unit test that uses HtmlUnit and my own package.
For my own package, I use java.util.Logger.
HtmlUnit seems to use commons logging:
http://htmlunit.sourceforge...
Dear All:
Just wondering... I have some code (disabling certain logging output) that I'd like to be run before all tests...
I do not see any such examples for JUnit/Groovy testing in the samples directory... is there a good/correct place to put such code?
Thank you!
Misha
p.s. I am using the 0.9 preview 3 version.
...
Dear All:
I would like Grade/Ivy to use cached versions of my jars, as it takes ~20 seconds to check every time for updates.
Is this possible?
Thank you
Misha
...
Dear All:
I am using TestNG+ReportNG per wiki instructions in gradle (I fixed on cookbook as default example did not work form me).
http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-addreporters
I would like to somehow capture console output in TestNG. Is this possible?
Thank you
Misha
...
If I have a test that hangs I don't seem to get any results.
Is there any way to see output live?
Thank you
Misha
...