score:4
https://docs.gradle.org/current/userguide/scala_plugin.html:
Unless a task's scalaClasspath is configured explicitly, the Scala (base) plugin will try to infer it from the task's classpath. This is done as follows:
If a scala-library Jar is found on classpath, and the project has at least one repository declared, a corresponding scala-compiler repository dependency will be added to scalaClasspath.
Otherwise, execution of the task will fail with a message saying that scalaClasspath could not be inferred.
i.e. you need to add
dependencies {
compile 'org.scala-lang:scala-library:2.11.7'
}
to build.gradle
. If you want to build a stand-alone jar, see Building a uberjar with Gradle.
As Rex Kerr mentions, if you don't have a specific reason to use Gradle, I'd go with SBT for a Scala project.
Source: stackoverflow.com
Related Query
- How to compile scala into runnable jar file
- How to include a jar file into Scala code
- How do I make a (minimal) runnable jar file from a scala eclipse project
- How to package Scala libraries into runnable jar in Eclipse
- In Scala project: How to add dependency Jar details into Manifest file
- How to make a jar file from scala
- Scala - How to compile code from an external file at runtime?
- How to know if a Scala file modified with IntelliJ Idea is saved and if it is checked into CVS?
- how to pass configuration file to scala jar file
- How much of a jar file gets loaded into the memory
- How to read csv file into an Array of arrays in scala
- How can I package a simple single Scala file as a stand-alone jar (no sbt)?
- How to compile Scala source code into .Net
- How to convert Play! 2.0 Scala file into a format for CSVReader?
- How do I read a non standard csv file into dataframe with python or scala
- How to read a JSON file into a Map, using Scala
- how to run scala jar file within java file?
- How to add external Excel file in Scala Jar in Intellij
- Compiling Spark Scala Program into jar file using installed spark and maven
- How to load a json file which is having double quotes within a string into a dataframe in spark scala
- How to include python and Scala files all together in jar file using sbt?
- Packaging scala code into a jar file with proguard not working
- How is Scala faster than Java when both are compiled into `.class` file which is run by JVM only?
- How to create a Scala executable jar file that is built with Maven, and has log4j included, using IntelliJ IDEA IDE
- how to compile and run one single scala file without building whole project within intellij
- how to save HashSet into a plain text file in Scala
- Scala - how to map data from a file into different formats?
- How to extract urls from HYPERLINKS in excel file when reading into scala spark dataframe
- how to import JSON file into mongodb in Scala
- How to avoid Out of Memory when Parsing a file into a stream in scala
More Query from same tag
- Scala enumeration serialization in jersey/jackson is not working for me
- How should I think about Scala's Product classes?
- Using monad transformers change expression result
- Kill a sys.process when the scala process dies?
- missing parameter type for expanded function in List[_]
- Kafka Streams App exits within seconds of starting
- Arguments in Auxiliary Constructor in Scala
- Enumerate the fields of a subclass in Scala
- sbt-avro is not generating Scala classes, possible settings issue
- How to access the dependency version in code?
- spark select and add columns with alias
- How to find degree of each vertex in graph - RDD Transformation?
- Play Framework: How to implement REST API for File Upload
- How to perform one to many mapping on spark scala dataframe column using flatmaps
- I'm using Scala 2.11.7 but sbt tries to compile my classes to target/scala-2.10
- How to provide Java callbacks (with 'void' return type), to Scala?
- Improvement of State Machine implemented in scala
- Neo4j - Enterprise Edition Features
- Spark 2.4 : How to create custom encoder for type List?
- Spark join *without* shuffle
- Use method to override itself in scala
- How to validate CSV column count when decoding to Scala case class using Kantan CSV
- How can I sort the lines in large text file by custom function in Scala?
- How can I add more threads to the forkjoinpool
- How to avoid duplication of type constraint in scala
- How to say that a type parameter must have one supertype of alternative supertypes?
- Why did Scala's library double its size between 2.7 and 2.8?
- Updating large data structures in idiomatic Scala
- Spark Scala - Split Array of Structs into Dataframe Columns
- How to get an element in WrappedArray: result of Dataset.select("x").collect()?