Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for jdk 11 or 17 #1030

Open
Magallo opened this issue Oct 3, 2022 · 3 comments
Open

support for jdk 11 or 17 #1030

Magallo opened this issue Oct 3, 2022 · 3 comments

Comments

@Magallo
Copy link

Magallo commented Oct 3, 2022

Hi,
I tried to build a working gwt material project of my own using jdk 17 instead of jdk 8 but unfortunately it doesn't work. I'm using Eclipse ID and when I execute Debug As -> Mavel install I got build errors.

Are you planning to extend support to newest jdk versions instead of being stuck with jdk 8?

Thanks.

@Magallo Magallo changed the title supporto for jdk 11 or 17 support for jdk 11 or 17 Oct 4, 2022
@michael-newsrx
Copy link

It seems to work fine with Gradle and JDK 17. So it really sounds like a build config issue.

@Magallo
Copy link
Author

Magallo commented Oct 13, 2022

Unfortunately I don’t know Gradle and I don’t know how I could configure a gwt-material project using it instead of Maven. Do you have some suggestions to solve this problem?

@michael-newsrx
Copy link

Here are the Gradle fragments we use for GWT. I've no idea how to do this with Maven. Maybe you'll see something we configure via Gradle that you can configure via Maven that might fix your issue.

settings.gradle

pluginManagement {
  plugins {
    id "org.docstr.gwt" version "1.1.21"
    id "org.gretty" version "3.0.8"
  }
}

build.gradle

plugins {
    id "idea"
    id "java"
    id "war"
    id "org.gretty"
    id "org.docstr.gwt"
}


java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_17
compileJava.options.encoding = 'UTF-8'
compileJava.options.release = 17
compileTestJava.options.encoding = 'UTF-8'
compileTestJava.options.release = 17
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.withSourcesJar()
jar {
    from sourceSets.main.allSource
    duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

repositories {
    mavenCentral()
    google()
    maven { url 'https://jitpack.io' }
}

tasks.withType(GwtSuperDev) {
    args "-style", "PRETTY", "-strict"
    jvmArgs "-Dgwt.watchFileChanges=false"
}

war {
    archiveName 'servlet.war'
    rootSpec.exclude('WEB-INF/classes/**/*.class')
}

gretty {
    httpPort = 8080
    servletContainer = 'tomcat9'
    contextPath = "servlet"
    extraResourceBase 'build/gwt/out'
}

gwt {
    src += files(compileJava.options.annotationProcessorGeneratedSourcesDirectory)
    logLevel = "INFO"
    maxHeapSize = "4096M"
    modules 'com.example.EntryPointClassName'
    compiler {
        disableClassMetadata = false
        strict = true
        style = "OBF"
    }

    devModules += 'com.example.EntryPointClassName'

    superDev {
        noPrecompile = true
        failOnError = true
        bindAddress = "0.0.0.0"
    }
}

More information about the GWT Gradle plugin can be found at: https://gwt-gradle-plugin.documentnode.io/

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

No branches or pull requests

2 participants