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

[GWT 2.8/Pluging 0.6] Issue with gwt sub-projects #101

Open
hrstoyanov opened this issue May 13, 2016 · 1 comment
Open

[GWT 2.8/Pluging 0.6] Issue with gwt sub-projects #101

hrstoyanov opened this issue May 13, 2016 · 1 comment

Comments

@hrstoyanov
Copy link

hrstoyanov commented May 13, 2016

Hello,
If my understanding from the war-using-library example is correct, if one has two projects like:

  • web-app (a war project)
  • web-shared (a jar library project)

Then in the war project gradle file (web-app/build.gradle), the shared library can be incorporated like this:

gwt { 
    modules     "${gwt_app_modules}"
    devModules  "${gwt_app_modules}"
    gwtVersion  "${gwt_version}"
    src       += files(project(':web-shared').sourceSets.main.allJava.srcDirs) + files(project(':web-shared').sourceSets.main.output.resourcesDir)
...
}

The problem I see is that the compiled classes from the library project do not go into web-app/build/classes, but are generated directly in the source tree of the war project: web-app/src/main/WEB-INF/classes, which is really bad!

It seems that I need to set some property in my web-app/build.gradle to tell it where to place the compile results from the imported library... Something like this (which does not work!):

gwt {

    modules     "${gwt_app_modules}"
    devModules  "${gwt_app_modules}"
    gwtVersion  "${gwt_version}"
    src       +=  <same as above>
    output = $projectDit/build
...
}

Any idea what is going on and how to fix it? Could this be GWT 2.8 issue?Thanks!

@hrstoyanov hrstoyanov changed the title Issue with gwt sub-projetcs Issue with gwt sub-projects May 13, 2016
@hrstoyanov hrstoyanov changed the title Issue with gwt sub-projects [GWT 2.8/Pluging 0.6] Issue with gwt sub-projects May 13, 2016
@hrstoyanov
Copy link
Author

My temp solution is this:

task cleanUpAfterCompileGwt << {
    delete  "${projectDir}/src/main/webapp/WEB-INF/classes/com", "${projectDir}/src/main/webapp/WEB-INF/classes/org"
}
compileGwt.finalizedBy(cleanUpAfterCompileGwt)

At this point though, I am not sure if this is plug-in's fault. There are some linkers/codegenerators at play in my case that I suspect too.

Also note, that the web-shared project does not need to anything but an ordinary java project with GWT structure ( e.g you can skip the gwt plugin stuff), something not very obvious from the example...

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

1 participant