Idea 13 and Gradle when trying to use a scala compiler in Scala faces does not find scala -library

I would like to use a scala compiler from Gradle dependencies in my project, but when I try to use it, I get:

enter image description here

Am I using the wrong addiction? Why is the scala library not found? Here is my build:

apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'eclipse'

repositories { mavenCentral() }

dependencies {
    def hamcrestVersion = "1.3"
    def jmockVersion = "2.6.0"
    compile 'org.mongodb:mongo-java-driver:2.12.0-rc0',
            'org.mongodb.morphia:morphia:0.106',
            'org.scala-lang:scala-library:2.10.3',
            'org.scala-lang:scala-compiler:2.10.3'

    testCompile 'org.scalatest:scalatest_2.10:2.1.0',
            'junit:junit:4.11',
            'de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.42',
            "org.hamcrest:hamcrest-core:${hamcrestVersion}",
            "org.hamcrest:hamcrest-library:${hamcrestVersion}",
            "org.jmock:jmock:${jmockVersion}"
    testCompile("org.jmock:jmock-junit4:${jmockVersion}") {
        exclude group: "junit"
    }
}
+4
source share
1 answer

perhaps you can change the record of the created gradle library by adding scala -library * .jar e scala -reflect * .jar

This works, but it's an ugly workaround (which you probably have to do over and over again when changing project dependencies in the gradle file)

+1
source

Source: https://habr.com/ru/post/1532318/


All Articles