-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathbuild.sbt
83 lines (76 loc) · 2.92 KB
/
build.sbt
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
import Dependencies._
import ScaloidSettings._
lazy val basicSettings = Seq(
organization := "org.scaloid",
organizationHomepage := Some(new URL("http://blog.scaloid.org")),
description := "Less Painful Android Development with Scala",
startYear := Some(2012),
crossScalaVersions := Seq("2.11.12", "2.12.7", "2.13.12"),
version := scaloidVersion,
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomIncludeRepository := {
_ => false
},
pomExtra :=
<url>https://scaloid.org</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:pocorall/scaloid.git</url>
<connection>scm:git:[email protected]:pocorall/scaloid.git</connection>
<developerConnection>scm:git:[email protected]:pocorall/scaloid.git</developerConnection>
</scm>
<developers>
<developer>
<id>pocorall</id>
<name>Sung-Ho Lee</name>
<email>[email protected]</email>
</developer>
</developers>,
scalacOptions := Seq(
"-target:jvm-1.8", "-deprecation", "-feature"
),
javacOptions ++= Seq(
"-source", "1.8",
"-target", "1.8"),
resolvers += "Android Repository" at (new File(System.getenv("ANDROID_HOME")) / "extras" / "android" / "m2repository").getCanonicalFile.toURI.toString
)
// root project
lazy val parent = project.in(file("."))
.settings(basicSettings: _*)
.settings(scaloidSettings: _*)
.settings(publish := {}, publishLocal := {})
.aggregate(common, support_v4, util)
lazy val common = Project("scaloid", file("scaloid-common"))
.settings(name := "scaloid", exportJars := true)
.settings(basicSettings: _*)
.settings(scaloidSettings: _*)
.settings(libraryDependencies ++= Seq(robolectric, scalaTest, junit, junitInterface, android),
libraryDependencies += ("org.scala-lang" % "scala-reflect" % scalaVersion.value))
//RobolectricTestRunner requires "fork" to reflect test code changes without sbt restart.
.settings((Test / fork) := true)
lazy val support_v4 = Project("support-v4", file("scaloid-support-v4"))
.settings(name := "scaloid-support-v4", exportJars := true)
.settings(basicSettings: _*)
.settings(scaloidSettings: _*)
.settings(libraryDependencies += android_support_v4)
.settings(libraryDependencies += scaloid)
.dependsOn(common)
lazy val util = project.in(file("scaloid-util"))
.settings(name := "scaloid-util", exportJars := true)
.settings(basicSettings: _*)
.settings(scaloidSettings: _*)
.settings(libraryDependencies += scaloid)
.dependsOn(common)