File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
modules/bcv-gradle-plugin/src/main/kotlin/dsl Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ @file:Suppress(" PackageDirectoryMismatch" )
2+
3+ /* *
4+ * Gradle does not generate Kotlin DSL accessors for Settings plugins, so they are defined manually.
5+ *
6+ * For ease of use, the package is set to `org.gradle.kotlin.dsl`, which is a default import
7+ * package in `settings.gradle.kts` files.
8+ */
9+ package org.gradle.kotlin.dsl
10+
11+ import dev.adamko.kotlin.binary_compatibility_validator.BCVSettingsPlugin
12+ import org.gradle.api.initialization.Settings
13+
14+ /* * Retrieves the [binaryCompatibilityValidator][BCVSettingsPlugin.Extension] extension. */
15+ val Settings .binaryCompatibilityValidator: BCVSettingsPlugin .Extension
16+ get() = extensions.getByType()
17+
18+
19+ /* * Configures the [binaryCompatibilityValidator][BCVSettingsPlugin.Extension] extension. */
20+ fun Settings.binaryCompatibilityValidator (configure : BCVSettingsPlugin .Extension .() -> Unit ) =
21+ binaryCompatibilityValidator.configure()
You can’t perform that action at this time.
0 commit comments