mirror of
https://github.com/lightbend/config.git
synced 2025-02-15 22:00:52 +08:00
Get the build ready for publishing releases
Not sure this is quite right, but closer than before.
This commit is contained in:
parent
0ff5f1ff8c
commit
2365db970e
30
build.sbt
30
build.sbt
@ -1,11 +1,27 @@
|
|||||||
|
|
||||||
version in GlobalScope := "0.1"
|
// to release, bump major/minor/micro as appropriate,
|
||||||
|
// drop SNAPSHOT, tag and publish.
|
||||||
|
// add snapshot back so git master is previous release
|
||||||
|
// with -SNAPSHOT.
|
||||||
|
// when releasing a SNAPSHOT to the repo, bump the micro
|
||||||
|
// version at least.
|
||||||
|
// Also, change the version number in the README.md
|
||||||
|
// Versions and git tags should follow: http://semver.org/
|
||||||
|
// except using -SNAPSHOT instead of without hyphen.
|
||||||
|
|
||||||
// no binary for the root project
|
version in GlobalScope := "0.1.0-SNAPSHOT"
|
||||||
publishArtifact in (Compile, packageBin) := false
|
|
||||||
|
|
||||||
// no javadoc for the root project
|
organization in GlobalScope := "com.typesafe.config"
|
||||||
publishArtifact in (Compile, packageDoc) := false
|
|
||||||
|
|
||||||
// no source for the root project
|
scalacOptions in GlobalScope in Compile := Seq("-unchecked", "-deprecation")
|
||||||
publishArtifact in (Compile, packageSrc) := false
|
|
||||||
|
scalacOptions in GlobalScope in Test := Seq("-unchecked", "-deprecation")
|
||||||
|
|
||||||
|
publishTo in GlobalScope <<= (isSnapshot) { snapshot =>
|
||||||
|
import Classpaths._
|
||||||
|
Some(if (snapshot) typesafeSnapshots else typesafeResolver)
|
||||||
|
}
|
||||||
|
|
||||||
|
publishMavenStyle in GlobalScope := true
|
||||||
|
|
||||||
|
credentials in GlobalScope += Credentials(Path.userHome / ".ivy2" / ".typesafe-credentials")
|
||||||
|
@ -10,6 +10,8 @@ fork in run := true
|
|||||||
|
|
||||||
fork in run in Test := true
|
fork in run in Test := true
|
||||||
|
|
||||||
|
autoScalaLibrary := false
|
||||||
|
|
||||||
libraryDependencies += "net.liftweb" %% "lift-json" % "2.4-SNAPSHOT" % "test"
|
libraryDependencies += "net.liftweb" %% "lift-json" % "2.4-SNAPSHOT" % "test"
|
||||||
|
|
||||||
libraryDependencies += "com.novocode" % "junit-interface" % "0.7" % "test"
|
libraryDependencies += "com.novocode" % "junit-interface" % "0.7" % "test"
|
||||||
@ -28,4 +30,4 @@ seq(javadocSettings: _*)
|
|||||||
|
|
||||||
JavadocKeys.javadocOptions += "-exclude com.typesafe.config.impl"
|
JavadocKeys.javadocOptions += "-exclude com.typesafe.config.impl"
|
||||||
|
|
||||||
doc := error("use the 'javadoc' task instead of 'doc'")
|
doc in Compile <<= JavadocKeys.javadoc
|
||||||
|
0
examples/complex-app/build.sbt
Normal file
0
examples/complex-app/build.sbt
Normal file
0
examples/simple-app/build.sbt
Normal file
0
examples/simple-app/build.sbt
Normal file
0
examples/simple-lib/build.sbt
Normal file
0
examples/simple-lib/build.sbt
Normal file
@ -2,21 +2,42 @@ import sbt._
|
|||||||
import Keys._
|
import Keys._
|
||||||
|
|
||||||
object ConfigBuild extends Build {
|
object ConfigBuild extends Build {
|
||||||
|
val unpublished = Seq(
|
||||||
|
// no artifacts in this project
|
||||||
|
publishArtifact := false,
|
||||||
|
// make-pom has a more specific publishArtifact setting already
|
||||||
|
// so needs specific override
|
||||||
|
publishArtifact in makePom := false,
|
||||||
|
// can't seem to get rid of ivy files except by no-op'ing the entire publish task
|
||||||
|
publish := {},
|
||||||
|
publishLocal := {}
|
||||||
|
)
|
||||||
|
|
||||||
|
// this is in newer sbt versions, for now cut-and-pasted
|
||||||
|
val isSnapshot = SettingKey[Boolean]("is-snapshot", "True if the the version of the project is a snapshot version.")
|
||||||
|
|
||||||
|
override val settings = super.settings ++ Seq(isSnapshot <<= isSnapshot or version(_ endsWith "-SNAPSHOT"))
|
||||||
|
|
||||||
lazy val root = Project(id = "root",
|
lazy val root = Project(id = "root",
|
||||||
base = file(".")) aggregate(testLib, configLib, simpleLib, simpleApp)
|
base = file("."),
|
||||||
|
settings = Project.defaultSettings ++ unpublished) aggregate(testLib, configLib, simpleLib, simpleApp)
|
||||||
|
|
||||||
lazy val configLib = Project(id = "config",
|
lazy val configLib = Project(id = "config",
|
||||||
base = file("config")) dependsOn(testLib % "test->test")
|
base = file("config")) dependsOn(testLib % "test->test")
|
||||||
|
|
||||||
lazy val testLib = Project(id = "test-lib",
|
lazy val testLib = Project(id = "test-lib",
|
||||||
base = file("test-lib"))
|
base = file("test-lib"),
|
||||||
|
settings = Project.defaultSettings ++ unpublished)
|
||||||
|
|
||||||
lazy val simpleLib = Project(id = "simple-lib",
|
lazy val simpleLib = Project(id = "simple-lib",
|
||||||
base = file("examples/simple-lib")) dependsOn(configLib)
|
base = file("examples/simple-lib"),
|
||||||
|
settings = Project.defaultSettings ++ unpublished) dependsOn(configLib)
|
||||||
|
|
||||||
lazy val simpleApp = Project(id = "simple-app",
|
lazy val simpleApp = Project(id = "simple-app",
|
||||||
base = file("examples/simple-app")) dependsOn(simpleLib)
|
base = file("examples/simple-app"),
|
||||||
|
settings = Project.defaultSettings ++ unpublished) dependsOn(simpleLib)
|
||||||
|
|
||||||
lazy val complexApp = Project(id = "complex-app",
|
lazy val complexApp = Project(id = "complex-app",
|
||||||
base = file("examples/complex-app")) dependsOn(simpleLib)
|
base = file("examples/complex-app"),
|
||||||
|
settings = Project.defaultSettings ++ unpublished) dependsOn(simpleLib)
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
// no binary
|
|
||||||
publishArtifact in (Compile, packageBin) := false
|
|
||||||
|
|
||||||
// no javadoc
|
|
||||||
publishArtifact in (Compile, packageDoc) := false
|
|
||||||
|
|
||||||
// no source
|
|
||||||
publishArtifact in (Compile, packageSrc) := false
|
|
Loading…
Reference in New Issue
Block a user