Skip to content

Commit 8c5c506

Browse files
Excludes BuildInfo class from packaging (#65)
* Excludes BuildInfo class from packaging * Disables non-error logging in tests * Adds explanatory comment
1 parent 73e56c6 commit 8c5c506

3 files changed

Lines changed: 41 additions & 3 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration status="WARN">
3+
4+
<Appenders>
5+
<Console name="Console" target="SYSTEM_OUT">
6+
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
7+
</Console>
8+
</Appenders>
9+
10+
<Loggers>
11+
<Root level="error">
12+
<AppenderRef ref="Console"/>
13+
</Root>
14+
</Loggers>
15+
</Configuration>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration status="WARN">
3+
4+
<Appenders>
5+
<Console name="Console" target="SYSTEM_OUT">
6+
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
7+
</Console>
8+
</Appenders>
9+
10+
<Loggers>
11+
<Root level="error">
12+
<AppenderRef ref="Console"/>
13+
</Root>
14+
</Loggers>
15+
</Configuration>

project/ProjectPlugin.scala

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ object ProjectPlugin extends AutoPlugin {
7070
organizationName = "47 Degrees",
7171
groupId = "com.47deg",
7272
organizationHomePage = url("http://47deg.com"),
73-
organizationEmail = "hello@47deg.com",
74-
license = sbtorgpolicies.model.MITLicense
73+
organizationEmail = "hello@47deg.com"
7574
),
75+
orgLicense := sbtorgpolicies.model.MITLicense,
7676
scalaVersion := scalac.`2.12`,
7777
crossScalaVersions := "2.10.6" :: scalac.crossScalaVersions,
7878
scalaOrganization := "org.scala-lang",
@@ -82,6 +82,14 @@ object ProjectPlugin extends AutoPlugin {
8282
}),
8383
headers := Map(
8484
"scala" -> MIT("2016", "47 Degrees, LLC. <http://www.47deg.com>")
85-
)
85+
),
86+
// This is necessary to prevent packaging the BuildInfo with
87+
// sensible information like the Github token. Do not remove.
88+
mappings in (Compile, packageBin) ~= { (ms: Seq[(File, String)]) =>
89+
ms filter {
90+
case (_, toPath) =>
91+
!toPath.startsWith("github4s/BuildInfo")
92+
}
93+
}
8694
) ++ shellPromptSettings
8795
}

0 commit comments

Comments
 (0)