Thibault Kruse | 4 May 2013 12:21

Re: Gradle REPL?

Hi, this is a response to a 2011 thread I found on nabble while trying to tackle the same problem.
not sure whether this will be placed in the same thread, or how else I could do so.

Here is my solution, in your build.gradle, do this:

configurations{
    addToClassLoader
}

repositories {
    mavenCentral()
}

dependencies {
    addToClassLoader "jline:jline:1.0"
}
URLClassLoader loader = GroovyObject.class.classLoader
configurations.addToClassLoader.each {File file ->
    loader.addURL(file.toURL())
}
task('groovysh') << {
    def shell = new org.codehaus.groovy.tools.shell.Groovysh()
    shell.interp.context.variables.put("project", this)
    shell.run()
}

then run "gradle groovysh -q"

Maybe a gradle plugin writer can package this into a plugin, somehow making sure the prompt is clean even when not run with "-q".

This gives people new to gradle some useful introspection, like:

groovy:000> project.tasks
===> [task ':assemble', task ':build', task ':buildDependents', task ':buildNeeded', task ':check', task ':classes', task ':clean', task ':compileGroovy', task ':compileJava', task ':compileTestGroovy', task ':compileTestJava', task ':groovydoc', task ':groovysh', task ':jar', task ':javadoc', task ':processResources', task ':processTestResources', task ':test', task ':testClasses']
groovy:000> project.configurations
===> [configuration ':addToClassLoader', configuration ':archives', configuration ':compile', configuration ':default', configuration ':groovy', configuration ':runtime', configuration ':testCompile', configuration ':testRuntime']

However it is not all great, since the internal APi is not optimized for the REPL:
groovy:000> project.dependencies
===> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler <at> 165bece2
groovy:000> project.repositories[0]
===> org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository_Decorated <at> 48c91629

Also groovysh being a bit of a rough diamond still this is not exactly newbie friendly, but could grow into something great.

Not sure what else this approach could lead to, maybe someone will find this useful for other things.
Peter Niederwieser | 3 May 2013 06:17
Picon
Gravatar

http://repo1.maven.org/maven2/commons-cli/commons-cli/1.1/c ommons-cli-1.1.jar'.

The user mailing list is no longer monitored actively. Please use
http://forums.gradle.org.

--
View this message in context: http://gradle.1045684.n5.nabble.com/Gradle-Could-not-HEAD-http-repo1-maven-org-maven2-commons-cli-commons-cli-1-1-c-ommons-cli-1-1-jar-tp5711262p5711267.html
Sent from the gradle-user mailing list archive at Nabble.com.

Eric Berry | 2 May 2013 09:13
Picon

[ANN] 1.2 release of gradle-release plugin.

I'm pleased to announce the 1.2 version release of my gradle-release plugin.

This release includes:
  • Git improvements (Thanks very much to Evgeny Shepelyuk)
  • Binaries are now hosted in Sonatype Maven Repo
  • Bug Fixes

Release notes here:
https://github.com/townsfolk/gradle-release/issues?milestone=1&state=closed

New installation instructions on how to use the Sonatype Maven Repo available on the project page:
https://github.com/townsfolk/gradle-release

Many thanks to those who posted issues and helped me work through the hosting issues.

Eric Berry
 
--
Learn from the past. Live in the present. Plan for the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
saketk | 1 May 2013 15:18
Picon

http://repo1.maven.org/maven2/commons-cli/commons-cli/1.1/c ommons-cli-1.1.jar'.

replying as not accepted

--
View this message in context: http://gradle.1045684.n5.nabble.com/Gradle-Could-not-HEAD-http-repo1-maven-org-maven2-commons-cli-commons-cli-1-1-c-ommons-cli-1-1-jar-tp5711262p5711263.html
Sent from the gradle-user mailing list archive at Nabble.com.

Rene Groeschke | 27 Mar 2013 15:21
Gravatar

Gradle 1.5 has been released

Hello,

Gradle 1.5 has just been released.

Please see: 
http://forums.gradle.org/gradle/topics/gradle_1_5_is_released for details

cheers!
René

--

Join me at the Gradle Summit 2013, June 13th and 14th in Santa Clara, 
CA: http://www.gradlesummit.com

Principal Engineer,
Gradleware Inc. - Gradle Training, Support, Consulting
rene.groeschke@...
http://gradleware.com

Peter Niederwieser | 27 Mar 2013 12:30
Picon
Gravatar

Re: FindbugsMain task can't find bcel's ClassFormatException

This mailing list isn't active anymore. Please use http://forums.gradle.org.

--
View this message in context: http://gradle.1045684.n5.nabble.com/FindbugsMain-task-can-t-find-bcel-s-ClassFormatException-tp5711092p5711093.html
Sent from the gradle-user mailing list archive at Nabble.com.

Daz DeBoer | 17 Mar 2013 02:46

Gradle 1.5-rc-2 is now available for testing

Gradle 1.5-rc-2 has just been released.
Please see: http://forums.gradle.org/gradle/topics/gradle_1_5_rc_2_is_now_available_for_testing

--
Darrell (Daz) DeBoer
Principal Engineer, Gradleware 
http://www.gradleware.com

Join us at the Gradle Summit 2013, June 13th and 14th in Santa Clara, CA: http://www.gradlesummit.com
tsvendsen | 11 Mar 2013 14:38
Picon

Re: how to disable default archive uploads to maven repo

Thanks that worked.
I ended up deleting all artifacts first, then adding mine afterwords.

--
View this message in context: http://gradle.1045684.n5.nabble.com/how-to-disable-default-archive-uploads-to-maven-repo-tp5710959p5711005.html
Sent from the gradle-user mailing list archive at Nabble.com.

alex.ruiz.05 | 1 Mar 2013 00:08
Picon
Favicon

Debugging Gradle daemon while using Tools API

Greetings,

I'm new to Gradle and I'm learning how the Tooling API work. I wrote a
simple program, similar to one of the samples in the samples/toolingApi. It
has a main method and I'm debugging it to see what it does.

The issue I found is that I cannot step into the Gradle daemon with the
debugger. I try Google and StackOverflow but nothing really useful.

I'm using Gradle v 1.5-20130227173909+0000

Any help will be greatly appreciated.

Regards,
-Alex

--
View this message in context: http://gradle.1045684.n5.nabble.com/Debugging-Gradle-daemon-while-using-Tools-API-tp5710965.html
Sent from the gradle-user mailing list archive at Nabble.com.

Eric Berry | 28 Feb 2013 00:58
Picon

[ANN] New release of gradle-templates plugin.

Hello all,
   I'm pleased to announce a new version of my gradle-templates.

This version is the first one after moving the project to it's new GitHub home:
https://github.com/townsfolk/gradle-templates

Note that the apply scripts are no longer on Launchpad and are hosted on my own server, which means you need to change your "apply from" to:
apply from: 'http://www.tellurianring.com/projects/gradle-plugins/gradle-templates/apply.groovy'

Besides the repository move, I've also updated the plugin to work with Gradle's daemon mode or when the System.console isn't available which should make it work in Cygwin as well.

Cheers,
Eric Berry

--
Learn from the past. Live in the present. Plan for the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor

Ricardo Mayerhofer | 26 Feb 2013 21:59
Picon

Issue when using jetty plugin with

Hi all,
I'm facing a problem when using JettyRunWar task and slf4j-jcl in my
application. The error shows up when starting the application:
Caused by: java.lang.IllegalStateException: Detected both jcl-over-slf4j.jar
AND slf4j-jcl.jar on the class path, preempting StackOverflowError. See also
http://www.slf4j.org/codes.html#jclDelegationLoop for more details.

It seems that the application dependency: slf4j-jcl-1.7.2.jar is conflicting
with gradle dependency: lib/jcl-over-slf4j-1.6.6.jar

Does JettyRunWar task inherit gradle classpath? Is there a way to workaround
this, for example starting Jetty on a different JVM or with a different
classpath?

Any help is appreciated.

Thanks.

--
View this message in context: http://gradle.1045684.n5.nabble.com/Issue-when-using-jetty-plugin-with-tp5710958.html
Sent from the gradle-user mailing list archive at Nabble.com.


Gmane