Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

gwt{src... } ignored in tests #80

Open
sherif181 opened this issue Mar 14, 2015 · 1 comment
Open

gwt{src... } ignored in tests #80

sherif181 opened this issue Mar 14, 2015 · 1 comment

Comments

@sherif181
Copy link

Hi
I have problems testing my project.
Im using the following configuration:

sourceSets {
    main{
        java{
            srcDir 'src/main/gen'
        }
    }
    test{
        java{
            srcDir 'src/test/gen'
        }
    }
}
dependencies {
     compile 'org.jboss.spec:jboss-javaee-6.0:3.0.2.Final'
     compile  rootProject.findProject('framework:gwtLib')
     providedCompile  rootProject.findProject('framework:dataQueryInterfaces')
     providedCompile  rootProject.findProject(":product:productCommon")
     testCompile "junit:junit:4.11"
     testCompile 'com.google.gwt:gwt-user:2.6.1'


}
gwt {
    test {
          hasGwtTests = true

    }

    gwtVersion='2.6.1' 
    logLevel =  de.richsource.gradle.plugins.gwt.LogLevel.INFO
    modules PRODUCT_NAME+"_gwt"
    println "gwt module is named: "+PRODUCT_NAME+"_gwt"
    src += files(rootProject.findProject('framework:gwtLib').sourceSets.main.allJava.srcDirs) + files(rootProject.findProject('framework:gwtLib').sourceSets.main.output.resourcesDir)
    src +=files([new File( 'src/main/gen')])
    src +=files([new File( 'src/test/gen')])    
    src += files(rootProject.findProject('framework:commons').sourceSets.main.allJava.srcDirs) + files(rootProject.findProject('framework:commons').sourceSets.main.output.resourcesDir)
    src += files(rootProject.findProject('product:productCommon').sourceSets.main.allJava.srcDirs) + files(rootProject.findProject('product:productCommon').sourceSets.main.output.resourcesDir)

}

The project builds and creates a usable war. The test task fails because the compiler cant find src/main/gen ie ingnores the src+=.. entry in gwt .Also i can access the source code in other projects only if i enable sourcecode export in the jar task (the standard build works without it )

Is there a way to specify the sources for tests ? Shouldnt the plugin work with standard gradle sourcesets ?

@rbrindl
Copy link

rbrindl commented May 4, 2015

looks similar to #81 , see my comment there: #81 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants