manolo / gwt-polymer-elements

Polymer Web Components for GWT. A collection of Material Design widgets for desktop and mobile.
Apache License 2.0
155 stars 49 forks source link

GWT 2.8.0.VC-SNAPSHOT works, 2.8.0-SNAPSHOT gives jsInterop exception #86

Closed komasoftware closed 8 years ago

komasoftware commented 8 years ago

Hi

I have this very straightforward gradle build.

buildscript {
    repositories {    jcenter() //repository where to fetch gwt gradle plugin
    }
    dependencies { classpath "de.richsource.gradle.plugins:gwt-gradle-plugin:0.6" // GWT
    }

}

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/google-snapshots/" }
    maven { url "http://oss.sonatype.org/content/repositories/snapshots" }
    maven { url "https://github.com/manolo/gwt-snapshot/raw/master/" }
}

apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "gwt"
apply plugin: "war"

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

ext.gwtPolymerVersion = "1.2.1.0"
//ext.gwtSDKVersion = "2.8.0.VC-SNAPSHOT"
ext.gwtSDKVersion = "2.8.0-SNAPSHOT"

sourceSets {
    main { java { srcDir "src/main/java" } }
}

compileJava{
    //enable incremental compilation
    options.incremental = true
    //options.compilerArgs += ["-verbose"]
}

dependencies {

    compile "org.hibernate:hibernate-validator:4.2.0.Final"
    compile "org.hibernate:hibernate-validator:4.2.0.Final:sources"
    compile "com.vaadin.polymer:vaadin-gwt-polymer-elements:${gwtPolymerVersion}"
    compile "com.google.gwt:gwt-elemental:${gwtSDKVersion}"
}

gwt {

    gwtVersion "${gwtSDKVersion}"

    modules "com.klawt.KlawtAdmin"

    eclipse.addGwtContainer = false;

    minHeapSize = "512M";
    maxHeapSize = "4096M";

    jsInteropMode = "JS"

}

And one simple module entry point

public class KlawtAdmin implements EntryPoint {

    /**
     * This is the entry point method.
     */
    public void onModuleLoad() {
        // Use Widget API to Create a <paper-button>
        PaperButton button = new PaperButton("Press me!");
        button.setRaised(true);
        RootPanel.get().add(button);
    }
}

Works fine when I point the GWT SDK to ext.gwtSDKVersion = "2.8.0.VC-SNAPSHOT" in my gradle build (which is the SDK used in https://github.com/manolo/gwt-polymer-chat-app).

selection_283

When I use the standard 2.8.0 snapshots ext.gwtSDKVersion = "2.8.0-SNAPSHOT" , then jsInterop does not seem to work and I am seeing this message

selection_282

Any hints ?

komasoftware commented 8 years ago

Ok, I figured out that the problems was in the SDK after waisting a lot of time on this. Only afterwards, I read about in some closed issues like #66 I think it is a good thing to keep this issue open to avoid others loosing there time on this, until we can switch over back to the official snapshots.

manolo commented 8 years ago

Using recent gwt-polymer-elements-1.2.3.0-SNAPSHOT, and gwt-2.8.0-SNAPSHOT everything should work fine.

lilletech commented 8 years ago

Can you deploy the version 1.2.3 on repository maven plz ?

manolo commented 8 years ago

1.2.3 is not released yet (probably we will do this week though), you have to use the snapshot instead which is in sonatype maven repo

manolo commented 8 years ago

announce: gwt-polymer-elements-1.2.3.0 has been released.