Skip to content

Commit

Permalink
Fix Metrics class generation to ignore the withMetricsConfig param
Browse files Browse the repository at this point in the history
The MetricsConfig should not be included in every Metrics classes but
only in the ones that actually use it (currently, only Velocity).
  • Loading branch information
Bastian committed Feb 12, 2021
1 parent debb6e9 commit 13300e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generate-metrics.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ fun enrichPlatformMetricsClass(platform: String, withMetricsConfig: Boolean): St
}.let {
convertClassToInnerClass(it, file("base/src/main/java/org/bstats/json/JsonObjectBuilder.java").readText())
}.let {
convertClassToInnerClass(it, file("base/src/main/java/org/bstats/config/MetricsConfig.java").readText())
if (withMetricsConfig) {
convertClassToInnerClass(it, file("base/src/main/java/org/bstats/config/MetricsConfig.java").readText())
} else it
}

return Formatter().formatSource(metrics);
Expand Down

0 comments on commit 13300e0

Please sign in to comment.