1
1
import OsgiKeys ._
2
2
3
- crossScalaVersions := Seq (" 2.10.6" , " 2.11.8" , " 2.12.0" )
3
+ val baseSettings = Seq (
4
+ organization := " com.lihaoyi" ,
5
+ name := " sourcecode" ,
6
+ version := " 0.1.4" ,
7
+ scalaVersion := " 2.11.11" ,
8
+ crossScalaVersions := Seq (" 2.10.6" , " 2.11.11" , " 2.12.2" , " 2.13.0-M1" ),
9
+ scmInfo := Some (ScmInfo (
10
+ browseUrl = url(" https://github.com/lihaoyi/sourcecode" ),
11
+ connection = " scm:git:git@github.com:lihaoyi/sourcecode.git"
12
+ )),
13
+ homepage := Some (url(" https://github.com/lihaoyi/sourcecode" )),
14
+ licenses := Seq (" MIT" -> url(" http://www.opensource.org/licenses/mit-license.html" )),
15
+ developers += Developer (
16
+ email = " haoyi.sg@gmail.com" ,
17
+ id = " lihaoyi" ,
18
+ name = " Li Haoyi" ,
19
+ url = url(" https://github.com/lihaoyi" )
20
+ )
21
+ )
22
+
23
+ baseSettings
4
24
5
25
def macroDependencies (version : String ) =
6
26
Seq (
@@ -13,46 +33,27 @@ def macroDependencies(version: String) =
13
33
else
14
34
Seq ())
15
35
16
- lazy val sourcecode = crossProject.settings(
17
- version := " 0.1.4" ,
18
- scalaVersion := " 2.11.8" ,
19
- name := " sourcecode" ,
20
- organization := " com.lihaoyi" ,
21
- libraryDependencies ++= macroDependencies(scalaVersion.value),
22
- unmanagedSourceDirectories in Compile ++= {
23
- CrossVersion .partialVersion(scalaVersion.value) match {
24
- case Some ((2 , n)) if n >= 12 =>
25
- Seq (baseDirectory.value / " .." / " shared" / " src" / " main" / " scala-2.11" )
26
- case _ =>
27
- Seq ()
28
- }
29
- },
30
- publishTo := Some (" releases" at " https://oss.sonatype.org/service/local/staging/deploy/maven2" ),
31
-
32
- pomExtra :=
33
- <url >https:// github.com/ lihaoyi/ sourcecode</url >
34
- <licenses >
35
- <license >
36
- <name >MIT license</name >
37
- <url >http:// www.opensource.org/ licenses/ mit- license.php</url >
38
- </license >
39
- </licenses >
40
- <scm >
41
- <url >git:// github.com/ lihaoyi/ sourcecode.git</url >
42
- <connection >scm: git:// github.com/ lihaoyi/ sourcecode.git</connection >
43
- </scm >
44
- <developers >
45
- <developer >
46
- <id >lihaoyi</id >
47
- <name >Li Haoyi </name >
48
- <url >https:// github.com/ lihaoyi</url >
49
- </developer >
50
- </developers >
51
- ).enablePlugins(SbtOsgi ).settings(osgiSettings).settings(
52
- exportPackage := Seq (" sourcecode.*" ),
53
- privatePackage := Seq (),
54
- dynamicImportPackage := Seq (" *" )
55
- )
36
+ lazy val sourcecode = crossProject
37
+ .settings(baseSettings)
38
+ .settings(
39
+ libraryDependencies ++= macroDependencies(scalaVersion.value),
40
+ unmanagedSourceDirectories in Compile ++= {
41
+ CrossVersion .partialVersion(scalaVersion.value) match {
42
+ case Some ((2 , n)) if n >= 12 =>
43
+ Seq (baseDirectory.value / " .." / " shared" / " src" / " main" / " scala-2.11" )
44
+ case _ =>
45
+ Seq ()
46
+ }
47
+ },
48
+ publishTo := Some (" releases" at " https://oss.sonatype.org/service/local/staging/deploy/maven2" )
49
+ )
50
+ .enablePlugins(SbtOsgi )
51
+ .settings(
52
+ osgiSettings,
53
+ exportPackage := Seq (" sourcecode.*" ),
54
+ privatePackage := Seq (),
55
+ dynamicImportPackage := Seq (" *" )
56
+ )
56
57
57
58
lazy val js = sourcecode.js
58
59
lazy val jvm = sourcecode.jvm
0 commit comments