jiakuan / gwt-gradle-plugin

Gradle plugin to support GWT related tasks.
https://gwt-gradle.docstr.org
Other
66 stars 34 forks source link

GWT version is is null or empty. #47

Closed SoltauFintel closed 3 years ago

SoltauFintel commented 3 years ago

Thanks for the GWT plugin! We use it this way:


gwt {
    modules 'de.xxx.webapp.ZzzzzMainModule'
    src += files('../xxx-common-webapp/src/main/java')
    maxHeapSize = '1G'
    gwtVersion = '' // We set it to empty to use our own lib gwt-servlet-xxx.
}

compileGwt {
    war = file('build/tmp/webapp')
}

dependencies {
    def xxxGwtVersion = '2.4.0'
    gwtSdk "com.google.gwt:gwt-dev:$xxxGwtVersion"
    gwtSdk "com.google.gwt:gwt-user:$xxxGwtVersion"
    runtimeOnly "com.google.gwt:gwt-servlet-xxx:$xxxGwtVersion" /* Use modified company-xxx lib and do not set gwtVersion. We need a manually edited version without Date_CustomFieldSerializer. */

    xproject 'xxx-plugin-yyy'  // this is needed, however, Ant2Gradle migration can not find out this dependency
}

task prepareWarBuild {
    dependsOn compileGwt
}

and in settings.gradle: classpath 'org.wisepersist:gwt-gradle-plugin:1.1.12', Gradle 6.8.x

jiakuan commented 3 years ago

Any pull requests are welcome.

On Thu, Jul 15, 2021 at 4:47 PM SoltauFintel @.***> wrote:

  • Please fix typo in message "GWT version is is null or empty.". See GwtVersion.java:64
  • Our goal is to omit the code in GwtBasePlugin.java:125-145. Therefore we don't need the above warning. Please find a way to suppress that message for a cleaner Gradle build output. Our original goal is to use our own gwt-servlet library.

Thanks for the GWT plugin! We use it this way:

gwt { modules 'de.xxx.webapp.ZzzzzMainModule' src += files('../xxx-common-webapp/src/main/java') maxHeapSize = '1G' gwtVersion = '' // We set it to empty to use our own lib gwt-servlet-xxx. }

compileGwt { war = file('build/tmp/webapp') }

dependencies { def xxxGwtVersion = '2.4.0' gwtSdk "com.google.gwt:gwt-dev:$xxxGwtVersion" gwtSdk "com.google.gwt:gwt-user:$xxxGwtVersion" runtimeOnly "com.google.gwt:gwt-servlet-xxx:$xxxGwtVersion" / Use modified company-xxx lib and do not set gwtVersion. We need a manually edited version without Date_CustomFieldSerializer. /

xproject 'xxx-plugin-yyy'  // this is needed, however, Ant2Gradle migration can not find out this dependency

}

task prepareWarBuild { dependsOn compileGwt }```

and in settings.gradle: classpath 'org.wisepersist:gwt-gradle-plugin:1.1.12'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jiakuan/gwt-gradle-plugin/issues/47, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECF5EWI537DY46MDWWFB3TX2OATANCNFSM5ANCQLWA .

SoltauFintel commented 3 years ago

ok ...

SoltauFintel commented 3 years ago

see pull request #48

jiakuan commented 3 years ago

Released new version 1.1.13 to include this.

SoltauFintel commented 3 years ago

org.gradle.api.InvalidUserDataException: No value has been specified for property 'gwtVersion'.

@jiakuan sorry

@ Optional must be added to gwtVersion in GwtPluginExtension.java:32

workaround: gwtVersion = '' // not null

jiakuan commented 3 years ago

Perhaps it's not a good idea to allow ignoring gwtVersion? if we don't need to by some special reason, we explicitly set it to empty string.

SoltauFintel commented 3 years ago

The documentation says that you can omit gwtVersion. I don't know the filename right now. My change made the code match the documentation again.

jiakuan commented 3 years ago

Sounds good. Will check and update the code on the weekend.

On Sun, 25 Jul 2021 at 2:21 pm, SoltauFintel @.***> wrote:

The documentation says that you can omit gwtVersion. I don't know the filename right now. My change made the code match the documentation again.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/jiakuan/gwt-gradle-plugin/issues/47#issuecomment-886153546, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECF5CJRKJWVU6QOKZO2KLTZOUNRANCNFSM5ANCQLWA .

SoltauFintel commented 3 years ago

Any news? ;-)

jiakuan commented 3 years ago

Sorry for the late response. Have just added @Optioanl to getGwtVersion() and released a new version 1.1.14. Could you please try again?

SoltauFintel commented 3 years ago

Will take a few days before I can do this.

SoltauFintel commented 3 years ago

Does not work with 1.1.14.

* What went wrong: A problem was found with the configuration of task ':xxx-webapp:compileGwt' (type 'GwtCompile'). No value has been specified for property 'gwtVersion'.

SoltauFintel commented 3 years ago

Looks like a task error. My guess: add also @Optional on AbstractGwtActionTask.getGwtVersion()

SoltauFintel commented 3 years ago

@jiakuan Any news? ;-)

jiakuan commented 3 years ago

Sorry was busy and hardly found time to check time. Can you please test the change and create a pull request? Thanks.

On Fri, 27 Aug 2021 at 7:53 pm, SoltauFintel @.***> wrote:

@jiakuan https://github.com/jiakuan Any news? ;-)

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/jiakuan/gwt-gradle-plugin/issues/47#issuecomment-907145444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECF5DXDSKXKSYGJ6YPOUTT654CZANCNFSM5ANCQLWA .

jiakuan commented 3 years ago

Added @Optional on AbstractGwtActionTask.getGwtVersion() too and released 1.1.15.

SoltauFintel commented 3 years ago

I installed the new version and the build works. But I'm still waiting for the test result from my colleague.

SoltauFintel commented 3 years ago

Test ok

Thank you!