Skip to content

Commit

Permalink
chore(gradle-plugin): update to 0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed May 10, 2024
1 parent 608736d commit 05acccd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 0 additions & 2 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ object Versions {

val junit5 = "5.10.1"

val gson = "2.10.1"
val apacheCommonsCodec = "1.15"
val jupiterEngine = junit5
val dokka = "1.9.10"
Expand All @@ -30,7 +29,6 @@ object BuildPlugins {
object Libraries {
val configuration = "com.malinskiy.marathon:configuration:${Versions.marathon}"
val kotlinLogging = "io.github.microutils:kotlin-logging:${Versions.kotlinLogging}"
val gson = "com.google.code.gson:gson:${Versions.gson}"
val apacheCommonsCodec = "commons-codec:commons-codec:${Versions.apacheCommonsCodec}"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class InfluxConfig {
var dbName: String = ""
var retentionPolicy: RetentionPolicy? = null
var defaults: Defaults = Defaults()
val readOnly: Boolean = false
}

class Influx2Config {
Expand All @@ -46,6 +47,7 @@ class Influx2Config {
var bucket: String = ""
var retentionPolicy: Influx2RetentionPolicy? = null
var defaults: Defaults = Defaults()
val readOnly: Boolean = false
}

class Influx2RetentionPolicy {
Expand All @@ -66,6 +68,7 @@ class GraphiteConfig {
var port: String? = null
var prefix: String? = null
var defaults: Defaults = Defaults()
val readOnly: Boolean = false
}

fun AnalyticsConfig.toAnalyticsConfiguration(): AnalyticsConfiguration {
Expand All @@ -80,7 +83,8 @@ fun AnalyticsConfig.toAnalyticsConfiguration(): AnalyticsConfiguration {
bucket = influx2.bucket,
retentionPolicyConfiguration = influx2.retentionPolicy?.toRetentionPolicy()
?: AnalyticsConfiguration.InfluxDb2Configuration.RetentionPolicyConfiguration.default,
defaults = influx2.defaults
defaults = influx2.defaults,
readOnly = influx2.readOnly,
)
influx != null -> AnalyticsConfiguration.InfluxDbConfiguration(
dbName = influx.dbName,
Expand All @@ -89,13 +93,15 @@ fun AnalyticsConfig.toAnalyticsConfiguration(): AnalyticsConfiguration {
url = influx.url,
retentionPolicyConfiguration = influx.retentionPolicy?.toRetentionPolicy()
?: AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration.default,
defaults = influx.defaults
defaults = influx.defaults,
readOnly = influx.readOnly,
)
graphite != null -> AnalyticsConfiguration.GraphiteConfiguration(
host = graphite.host,
port = graphite.port?.toIntOrNull(),
prefix = graphite.prefix,
defaults = graphite.defaults
defaults = graphite.defaults,
readOnly = graphite.readOnly,
)
else -> AnalyticsConfiguration.DisabledAnalytics
}
Expand Down

0 comments on commit 05acccd

Please sign in to comment.