From 05acccda2e011c515f37ee9deb14a3c452a63aab Mon Sep 17 00:00:00 2001 From: Anton Malinskiy Date: Fri, 10 May 2024 20:31:10 +1000 Subject: [PATCH] chore(gradle-plugin): update to 0.10.1 --- buildSrc/src/main/kotlin/Versions.kt | 2 -- .../marathon/gradle/configuration/AnalyticsConfig.kt | 12 +++++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 776987e..957bbb5 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -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" @@ -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}" } diff --git a/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/gradle/configuration/AnalyticsConfig.kt b/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/gradle/configuration/AnalyticsConfig.kt index b288818..abbbd8e 100644 --- a/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/gradle/configuration/AnalyticsConfig.kt +++ b/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/gradle/configuration/AnalyticsConfig.kt @@ -37,6 +37,7 @@ class InfluxConfig { var dbName: String = "" var retentionPolicy: RetentionPolicy? = null var defaults: Defaults = Defaults() + val readOnly: Boolean = false } class Influx2Config { @@ -46,6 +47,7 @@ class Influx2Config { var bucket: String = "" var retentionPolicy: Influx2RetentionPolicy? = null var defaults: Defaults = Defaults() + val readOnly: Boolean = false } class Influx2RetentionPolicy { @@ -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 { @@ -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, @@ -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 }