@@ -22,26 +22,42 @@ lazy val kamon = (project in file("."))
2222lazy val core = (project in file(" kamon-core" ))
2323 .enablePlugins(BuildInfoPlugin )
2424 .enablePlugins(AssemblyPlugin )
25- .enablePlugins(SbtProguard )
2625 .settings(commonSettings : _* )
2726 .settings(noPublishing : _* )
2827 .settings(
2928 moduleName := " kamon-core" ,
3029 buildInfoKeys := Seq [BuildInfoKey ](version),
3130 buildInfoPackage := " kamon.status" ,
32- packageBin in Compile := (proguard in Proguard ) .value.head ,
31+ packageBin in Compile := assembly .value,
3332 assemblyExcludedJars in assembly := filterOut((fullClasspath in assembly).value, " slf4j-api" , " config" ),
34- proguardOptions in Proguard ++= Seq (
35- " -dontnote" , " -dontwarn" , " -ignorewarnings" , " -dontobfuscate" , " -dontoptimize" ,
36- " -keepattributes **" ,
37- " -keep class kamon.Kamon { *; }" ,
38- " -keep class kamon.context.** { *; }" ,
39- " -keep class kamon.metric.** { *; }" ,
40- " -keep class kamon.module.** { *; }" ,
41- " -keep class kamon.status.** { *; }" ,
42- " -keep class kamon.tag.** { *; }" ,
43- " -keep class kamon.trace.** { *; }" ,
44- " -keep class kamon.util.** { *; }" ,
33+ assemblyShadeRules in assembly := Seq (
34+ ShadeRule .rename(" org.HdrHistogram.**" -> " kamon.lib.@0" ).inAll,
35+ ShadeRule .rename(" org.jctools.**" -> " kamon.lib.@0" ).inAll,
36+ ShadeRule .rename(" org.eclipse.**" -> " kamon.lib.@0" ).inAll,
37+ ShadeRule .zap(
38+ " org.eclipse.collections.impl.bag.**" ,
39+ " org.eclipse.collections.impl.**.primitive.**" ,
40+ " org.eclipse.collections.impl.**.parallel.**" ,
41+ " org.eclipse.collections.impl.iterator.**" ,
42+ " org.eclipse.collections.impl.list.**" ,
43+ " org.eclipse.collections.impl.multimap.**" ,
44+ " org.eclipse.collections.impl.primitive.**" ,
45+ " org.eclipse.collections.impl.set.**" ,
46+ " org.eclipse.collections.impl.stack.**" ,
47+ " org.eclipse.collections.impl.string.**" ,
48+ ).inAll,
49+ ShadeRule .keep(
50+ " kamon.Kamon" ,
51+ " kamon.context.**" ,
52+ " kamon.metric.**" ,
53+ " kamon.module.**" ,
54+ " kamon.status.**" ,
55+ " kamon.tag.**" ,
56+ " kamon.trace.**" ,
57+ " kamon.util.**" ,
58+ " org.jctools.queues.MpscArrayQueue" ,
59+ " org.eclipse.collections.impl.map.mutable.UnifiedMap"
60+ ).inAll
4561 ),
4662 libraryDependencies ++= Seq (
4763 " com.typesafe" % " config" % " 1.3.1" ,
@@ -74,6 +90,10 @@ lazy val statusPage = (project in file("kamon-status-page"))
7490 .settings(
7591 packageBin in Compile := assembly.value,
7692 assemblyExcludedJars in assembly := filterOut((fullClasspath in assembly).value, " slf4j-api" , " config" , " kamon-core" ),
93+ assemblyShadeRules in assembly := Seq (
94+ ShadeRule .rename(" com.grack.nanojson.**" -> " kamon.lib.@0" ).inAll,
95+ ShadeRule .rename(" fi.iki.elonen.**" -> " kamon.lib.@0" ).inAll,
96+ ),
7797 libraryDependencies ++= Seq (
7898 " org.nanohttpd" % " nanohttpd" % " 2.3.1" ,
7999 " com.grack" % " nanojson" % " 1.1"
@@ -139,21 +159,11 @@ lazy val commonSettings = Seq(
139159 case _ => Seq .empty
140160 }),
141161 assembleArtifact in assemblyPackageScala := false ,
142- assemblyShadeRules in assembly := Seq (
143- ShadeRule .rename(" org.HdrHistogram.**" -> " kamon.lib.@0" ).inAll,
144- ShadeRule .rename(" com.grack.nanojson.**" -> " kamon.lib.@0" ).inAll,
145- ShadeRule .rename(" org.jctools.**" -> " kamon.lib.@0" ).inAll,
146- ShadeRule .rename(" fi.iki.elonen.**" -> " kamon.lib.@0" ).inAll,
147- ShadeRule .rename(" org.eclipse.**" -> " kamon.lib.@0" ).inAll,
148- ),
149162 assemblyMergeStrategy in assembly := {
150163 case s if s.startsWith(" LICENSE" ) => MergeStrategy .discard
151164 case s if s.startsWith(" about" ) => MergeStrategy .discard
152165 case x => (assemblyMergeStrategy in assembly).value(x)
153- },
154- proguardVersion in Proguard := " 6.0.3" ,
155- proguardInputs in Proguard := Seq (assembly.value),
156- javaOptions in (Proguard , proguard) := Seq (" -Xmx2G" )
166+ }
157167)
158168
159169def filterOut (classPath : Classpath , patterns : String * ): Classpath = {
0 commit comments