This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
41 lines (30 loc) · 1.6 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
organization := "org.codeoverflow"
name := "chatoverflow-api"
lazy val apiVersionGenerator = TaskKey[Unit]("apiVersionGenerator")
lazy val requirementsGenerator = TaskKey[Unit]("requirementsGenerator")
// Convention: majorVersion++ on api signature update (else: minorVersion ++)
val majorVersion = 3
val minorVersion = 0
val patchVersion = 1
// The patch version is ignored and only used for the package version
version := s"$majorVersion.$minorVersion.$patchVersion"
// The API doesn't use scala. We can safely drop the scala version suffix from the jar and
// drop the dependency on the scala library.
autoScalaLibrary := false
crossPaths := false
import org.codeoverflow.chatoverflow.build.BuildUtils
javacOptions ++= BuildUtils.getJava8CrossOptions
// ---------------------------------------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------------------------------
import org.codeoverflow.chatoverflow.build.api.APIUtility
apiVersionGenerator := new APIUtility(streams.value.log)
.generateAPIVersionFile(sourceDirectory.value, majorVersion, minorVersion)
requirementsGenerator := new APIUtility(streams.value.log).generatedRequirements(sourceDirectory.value)
// Update the compile process to generate the api version java class
compile in Compile := {
apiVersionGenerator.value
requirementsGenerator.value
(compile in Compile).value
}
packageBin / includePom := false