CRaSH commands with gradle build

82 views
Skip to first unread message

Volker Krebs

unread,
Aug 7, 2014, 10:42:23 AM8/7/14
to crash...@googlegroups.com
Hello,
I'm new to crash, so please forgive me any stupid questions.

I want to write crash commands using gradle as build tool.
My build.gradle looks like this:
apply plugin: 'groovy'
apply plugin
: 'application'

mainClassName
= "org.crsh.standalone.CRaSH"

repositories
{
    mavenCentral
()
}
dependencies
{
    compile
'org.crashub:crash.shell:1.3.0'

}

When I put my commands into src/main/groovy/crash/commands they won't be loaded by crash.
I guess this is because the class files are in the classpath not the groovy sources.
Is there a way to tell crash to use compiled commands ?

Or what is the best way to build crash commands with gradle ?
I could play a bit around and try to tell gradle to put the groovy files into the classpath.

thanks
Volker

Julien Viet

unread,
Aug 7, 2014, 2:26:22 PM8/7/14
to crash...@googlegroups.com, Volker Krebs
yes you can configure the “mount point” that declares how crash find the configuration and the commands:

http://www.crashub.org/1.3/reference.html#_mount_point_configuration

--
Julien Viet
www.julienviet.com
> --
> Vous recevez ce message, car vous êtes abonné au groupe Google Groupes CRaSH User Group.
> Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez
> un e-mail à l'adresse crash-users...@googlegroups.com.
> Pour plus d'options, visitez le site https://groups.google.com/d/optout .
>

Volker Krebs

unread,
Aug 8, 2014, 3:36:31 AM8/8/14
to crash...@googlegroups.com, volker...@abas.de
Cool, thank you.
Just for the records.
This is how you can tell gradle to put the groovy sources into the distribution jar.
CRaSH then loads it automatically from the classpath:
apply plugin: 'groovy'
apply plugin
: 'application'

mainClassName
= "org.crsh.standalone.CRaSH"


jar
{
   
from sourceSets.main.allGroovy

Julien Viet

unread,
Aug 8, 2014, 5:43:56 AM8/8/14
to crash...@googlegroups.com, Volker Krebs, volker...@abas.de
thanks for the info! I’m sure it can be useful for other persons here

--
Julien Viet
www.julienviet.com
Reply all
Reply to author
Forward
0 new messages