无法在Intellij中使用gradle依赖项导入scala项目中的源类

时间:2017-09-21 15:06:37

标签: scala intellij-idea gradle scalatest

这是我项目的结构

src main scala com.abc 1.2 Album.scala Artist.scala test scala com.abc 1.2 AlbumTest.scala

规范文件

import org.scalatest._

class AlbumSpec extends FlatSpec {

it should "can add an Artist object to the album" in {
  val album = Album("Thriller", 1981,Artist("Michael", "Jackson"))

}

}

Album.scala

case class Album (name: String, year: Int,artist: Artist)

Artist.scala

case class Artist(firstName: String, lastName: String)

我无法在规范文件

中创建相册和艺术家的对象

IntelliJ版本:2017.2

Gradle版本:3.4.1

scalatest:scalatest_2.11:2.2.6

scala:2.11.6

0 个答案:

没有答案