Skip to content

Commit 6feb5bc

Browse files
committed
Define license at one place
1 parent 357259a commit 6feb5bc

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ lazy val blake3 = crossProject(JSPlatform, JVMPlatform, NativePlatform)
3939
scala.sys.process.Process("git rev-parse HEAD").!!.trim
4040
}
4141
),
42-
headerLicense := LicenseHeader.template,
42+
headerLicense := LicenseDefinition.template,
4343
buildInfoPackage := "ky.korins.blake3",
4444
libraryDependencies ++= Seq(
4545
"org.scalatest" %%% "scalatest" % scalatestVersion % Test,
@@ -71,7 +71,7 @@ lazy val bench = project.in(file("bench"))
7171
libraryDependencies ++= Seq(
7272
"io.lktk" % "blake3jni" % blake3jniVersion,
7373
),
74-
headerLicense := LicenseHeader.template,
74+
headerLicense := LicenseDefinition.template,
7575
assemblyMergeStrategy in assembly := {
7676
case PathList("META-INF", "MANIFEST.MF") =>
7777
MergeStrategy.discard

project/LicenseHeader.scala renamed to project/LicenseDefinition.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport.HeaderLicense
22
import de.heikoseeberger.sbtheader.License
3+
import sbt.url
34

4-
object LicenseHeader {
5+
object LicenseDefinition {
56
val template: Option[License.Custom] = Some(HeaderLicense.Custom(
67
"""scala-blake3 - highly optimized blake3 implementation for scala, scala-js and scala-native.
78
|
@@ -11,4 +12,9 @@ object LicenseHeader {
1112
|Alternatively, it islicensed under the Apache License 2.0.
1213
|""".stripMargin
1314
))
15+
16+
val licenses = Seq(
17+
"CC0 1.0 Universal" -> url("https://github.com/catap/scala-blake3/blob/master/LICENSE.txt"),
18+
"Apache License 2.0" -> url("https://github.com/catap/scala-blake3/blob/master/LICENSE.txt")
19+
)
1420
}

sonatype.sbt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import xerial.sbt.Sonatype.GitHubHosting
44
sonatypeProfileName in ThisBuild := "ky.korins"
55
publishMavenStyle in ThisBuild := true
66
sonatypeProjectHosting in ThisBuild := Some(GitHubHosting("catap", "scala-blake3", "[email protected]"))
7-
licenses in ThisBuild := Seq(
8-
"CC0 1.0 Universal" -> url("https://github.com/catap/scala-blake3/blob/master/LICENSE.txt"),
9-
"Apache License 2.0" -> url("https://github.com/catap/scala-blake3/blob/master/LICENSE.txt")
10-
)
7+
licenses in ThisBuild := LicenseDefinition.licenses
118
homepage in ThisBuild := Some(url("https://github.com/catap/scala-blake3"))
129
scmInfo in ThisBuild := Some(
1310
ScmInfo(

0 commit comments

Comments
 (0)