summaryrefslogtreecommitdiff
path: root/scalaplugin/src/test/resource/acyclic/build.sc
blob: 39bbc77aec78c3b776567902b45bdd3c80f2726c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
val acyclic =
  for(crossVersion <- Cross("2.10.6", "2.11.8", "2.12.0"))
  yield new ScalaModule{ main =>
    def organization = "com.lihaoyi"
    def name = "acyclic"
    def scalaVersion = crossVersion
    def version = "0.1.7"

    override def compileIvyDeps = Seq(
      Dep.Java("org.scala-lang", "scala-compiler", scalaVersion())
    )

    object Tests extends Module{
      override def projectDeps = Seq(main)

      override def ivyDeps = Seq(
        Dep("com.lihaoyi", "utest", "0.6.0")
      )
      def test() = T.command{
        TestRunner.apply(
          "mill.UTestFramework",
          runDepClasspath().map(_.path) :+ compile().path,
          Seq(compile().path)
        )
      }
    }
  }



//
//object acyclic extends crossModule(Seq("2.10.6", "2.11.8", "2.12.0"))(crossVersion =>
//  new ScalaModule{
//    def organization = "com.lihaoyi"
//    def name = "acyclic"
//    def scalaVersion = crossVersion
//    def version = "0.1.7"
//
//    override def compileIvyDeps = Seq(
//      Dep.Java("org.scala-lang", "scala-compiler", scalaVersion())
//    )
//
//    object Tests extends Module{
//      override def projectDeps = Seq(Acyclic(scalaVersion))
//
//      override def ivyDeps = Seq(
//        Dep("com.lihaoyi", "utest", "0.6.0")
//      )
//      def test() = T.command{
//        TestRunner.apply(
//          "mill.UTestFramework",
//          runDepClasspath().map(_.path) :+ compile().path,
//          Seq(compile().path)
//        )
//      }
//    }
//  }
//
//)
//

// Seq("2.10.6", "2.11.8", "2.12.0")
//case class Acyclic(scalaVersion: String = "2.11.8") extends CrossModule{
//  def organization = "com.lihaoyi"
//  def name = "acyclic"
//  def version = "0.1.7"
//
//  override def compileIvyDeps = Seq(
//    Dep.Java("org.scala-lang", "scala-compiler", scalaVersion())
//  )
//}
//
//case class AcyclicTests(scalaVersion: String = "2.11.8") extends CrossModule{
//  override def projectDeps = Seq(Acyclic(scalaVersion))
//
//  override def ivyDeps = Seq(
//    Dep("com.lihaoyi", "utest", "0.6.0")
//  )
//  def test() = T.command{
//    TestRunner.apply(
//      "mill.UTestFramework",
//      runDepClasspath().map(_.path) :+ compile().path,
//      Seq(compile().path)
//    )
//  }
//}

//unmanagedSourceDirectories in Test <+= baseDirectory(_ / "src" / "test" / "resources")
//
//// Sonatype
//publishTo <<= version { (v: String) =>
//  Some("releases"  at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
//}
//
//pomExtra := (
//  <url>https://github.com/lihaoyi/acyclic</url>
//    <licenses>
//      <license>
//        <name>MIT license</name>
//        <url>http://www.opensource.org/licenses/mit-license.php</url>
//      </license>
//    </licenses>
//    <scm>
//      <url>git://github.com/lihaoyi/utest.git</url>
//      <connection>scm:git://github.com/lihaoyi/acyclic.git</connection>
//    </scm>
//    <developers>
//      <developer>
//        <id>lihaoyi</id>
//        <name>Li Haoyi</name>
//        <url>https://github.com/lihaoyi</url>
//      </developer>
//    </developers>
//  )