Closed james-moliere closed 2 months ago
First of all, this particular repository never contained a line of code of TeaVM Flavor. What you are looking for is this one. Unfortunately, I don't maintain in for many years. I noticed that you are using Flavour fork which is base here, so I suggest that you ask its author to fix the issue. Another alternative would be to create you own fork or to send a patch to maintainer of existing fork.
I created this code... `package org.example;
import org.teavm.jso.JSBody; import org.teavm.jso.dom.html.HTMLDocument;
//TIP To Run code, press or
// click the icon in the gutter.
public class Main {
}`
along with this code... `import org.teavm.flavour.templates.BindTemplate; import org.teavm.flavour.widgets.ApplicationTemplate;
@BindTemplate("templates/client.html") public class Client extends ApplicationTemplate {
}
...with an index.html ...
<!DOCTYPE html>`
and a build file... `
plugins { java war id("org.teavm") version "0.9.2" }
//configurations { // create("teavmCli") // create("teavmClasslib") //}
group = "org.example" version = "1.0-SNAPSHOT"
repositories { mavenCentral() }
dependencies { implementation (teavm.libs.jsoApis) // implementation("com.frequal.flavour:teavm-flavour-templates:0.3.0") // implementation("com.frequal.flavour:teavm-flavour-json:0.3.0") // implementation("com.frequal.flavour:teavm-flavour-application:0.3.0") implementation("com.frequal.flavour:teavm-flavour-widgets:0.3.0")
}
tasks.test { useJUnitPlatform() }
java { toolchain { languageVersion = JavaLanguageVersion.of(17) } }
teavm.js { addedToWebApp = true mainClass = "org.example.Main" // debugInformation.set(true) // this is also optional, default value is.js
targetFileName = "example.js"
// sourceMap = true
//sourceFilePolicy = SourceFilePolicy.LINK_LOCAL_FILES
}
`
...and get this error with the command line...
It appears that the JSArray is in 'org.teavm.jso.core.JSArray' instead of 'org.teavm.jso.JSArray'
Any help would be appreciated.