There is something I don't get....still having problems.

here is my code layout:

http://grab.by/2V0d

I am trying to pull Config.groovy into my main build.gradle.

Here is config.groovy:

class Config{
    def static getConfig(fileName){
        return "BLAH"
    }
}

---------
here is my build.gradle file:

import Config
a = Config.getConfig("blah")
println a


here is my output when I run gradle from the build dir:

buildSrc:processResources
:buildSrc:classes
:buildSrc:jar
:buildSrc:assemble
:buildSrc:compileTestJava
:buildSrc:compileTestGroovy
:buildSrc:processTestResources
:buildSrc:testClasses
:buildSrc:test
:buildSrc:check
:buildSrc:build

FAILURE: Build failed with an exception.

* What went wrong:
Could not load compiled classes for build file
'/Users/pswenson/dev/sag/gradle/build/build.gradle' from cache.

* Try:
Run with -s or -d option to get more details. Run with -S option to
get the full (very verbose) stacktrace.

BUILD FAILED

Total time: 4.771 secs
zeppelin:build pswenson$









On Mon, Mar 8, 2010 at 11:09 AM, Peter Ledbrook <[email protected]> wrote:
>> thanks!
>>
>> what about jars I want added to my gradle classpath?
>
> Add the file 'buildSrc/build.gradle' and add:
>
>  apply id: 'groovy'
>  repositories {
>      mavenCentral()
>  }
>
>  dependencies {
>      classpath ...
>  }
>
> Note the name of the configuration in the dependencies section! It's
> 'classpath'.
>
> Hope that helps,
>
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to