gtache / scalajs-gradle Goto Github PK
View Code? Open in Web Editor NEWA Gradle plugin adding basic functions to support Scala.js
A Gradle plugin adding basic functions to support Scala.js
I am using this plugin with my scalajs project with the following build file:
// Apply the scala plugin to add support for Scala
apply plugin: 'scalajs-plugin'
archivesBaseName='frontend'
ext{
versions=[
js: 'sjs0.6',
major: '2.12',// Major scala version
]
versions['scala']=versions.major+'.8'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.gtache:scalajs-plugin:sjs0.6_2.12_0.3.0'
}
}
repositories{
mavenCentral()
}
dependencies {
compile 'org.scala-lang:scala-library:2.12.1'
compile group: 'org.scala-js', name: 'scalajs-dom_sjs0.6_2.12', version: '0.9.2'
compile group: 'com.lihaoyi', name: 'scalatags_sjs0.6_2.12', version: "0.6.3"
// Use Scalatest for testing our library
testCompile 'junit:junit:4.12'
}
The problem with the configuration is that the command
./gradlew FastOptJS
sometime creates the output javascript file in build/js folder, sometimes it does not create. I did not get any error message.
e.g., scalajs-env-selenium
If you are the original writer, could you please add copyright and license terms?
They seem missing.
Uncertainty prevents me from forking.
Please delete it. Besides tasks should figure out when to execute, not the linker.
(useClosureCompiler
is true by default in FullOpt)
Currently it is not possible to use other Scala compiler plugins, as the plugin overrides all compiler arguments.
Example:
Binding requires the Paradise Compiler plugin, which cannot be conifgured and therefore not used.
I currently have a project that compiles to jvm and js using the cross build feature https://www.scala-js.org/doc/project/cross-build.html . I'm trying to migrate to gradle but in order to do this I need to figure out a way to do this. Is there any way?
Any chance you can create a build that depends on scala 2.12.6?
With the SBT plugins it is possible to generate a simple launcher script for the main method, is this available in this plugin? I can't find it.
There is no way to set commonJSModule
http://www.scala-js.org/doc/project/module.html
Scalajs has continued to march forward, and frankly I can't even get a lot of useful client-side code to compile anymore under 0.6.15 and earlier versions. I understand there is significant API differences in later versions of sbt that appear to be needed to support the newer 0.6.17+ of sjs.
Is someone interested in working on an update to add support for these? scalajs-gradle seems to be the only show in town in terms of gradle plugins, so it would be super awesome if we could accomplish this.
some libraries like jquery for example (be.doeraene:scalajs-jquery_sjs0.6_2.11:0.9.1) are not compatible. so we might want to need to tweak the possible versions in the build file.
The plugin is very aggressive about scalaCompileOptions.additionalParameters, since instead of appending to it it simply sets the value without checking if there was anything in it already (in our project there is...), what's worse is it's doing it in project.afterEvaluate which practically makes it impossible for me to workaround it.
Similarly, you're assuming scalajs is the only plugin required for the project, which may not be the case (again, it isn't for us)...
I'd rather not fork the plugin but have this fixed in-place. Any chance this can be done anytime soon?
Thx,
Zsolt
Right now it is not possible to configure module support (with import and export) even though there are already some utility methods to allow for such configuration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.