Disable API validation for snapshots
This commit is contained in:
parent
6d324b6e0d
commit
60f5d15ba1
@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
|
- Disable API validation for snapshots
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- `publication.platform` changed to `publishing.platform`
|
- `publication.platform` changed to `publishing.platform`
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package ru.mipt.npm.gradle
|
package ru.mipt.npm.gradle
|
||||||
|
|
||||||
import groovy.text.SimpleTemplateEngine
|
import groovy.text.SimpleTemplateEngine
|
||||||
|
import kotlinx.validation.ApiValidationExtension
|
||||||
import kotlinx.validation.BinaryCompatibilityValidatorPlugin
|
import kotlinx.validation.BinaryCompatibilityValidatorPlugin
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
@ -8,10 +9,7 @@ import org.gradle.kotlin.dsl.*
|
|||||||
import org.jetbrains.changelog.ChangelogPlugin
|
import org.jetbrains.changelog.ChangelogPlugin
|
||||||
import org.jetbrains.dokka.gradle.DokkaPlugin
|
import org.jetbrains.dokka.gradle.DokkaPlugin
|
||||||
import org.jetbrains.dokka.gradle.DokkaTask
|
import org.jetbrains.dokka.gradle.DokkaTask
|
||||||
import ru.mipt.npm.gradle.internal.addGithubPublishing
|
import ru.mipt.npm.gradle.internal.*
|
||||||
import ru.mipt.npm.gradle.internal.addSonatypePublishing
|
|
||||||
import ru.mipt.npm.gradle.internal.addSpacePublishing
|
|
||||||
import ru.mipt.npm.gradle.internal.setupPublication
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
class KSciencePublishingExtension(val project: Project) {
|
class KSciencePublishingExtension(val project: Project) {
|
||||||
@ -177,6 +175,14 @@ open class KScienceProjectPlugin : Plugin<Project> {
|
|||||||
description = "Publish development or production release based on version suffix"
|
description = "Publish development or production release based on version suffix"
|
||||||
dependsOn(generateReadme)
|
dependsOn(generateReadme)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable API validation for snapshots
|
||||||
|
if (isSnapshot()) {
|
||||||
|
extensions.findByType<ApiValidationExtension>()?.apply {
|
||||||
|
validationDisabled = true
|
||||||
|
logger.warn("API validation is disabled for snapshot or dev version")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
Loading…
Reference in New Issue
Block a user