Skip to content

Commit

Permalink
Use 'plugins' block to apply the plugin in the usage example (Kotlin#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-g authored Feb 20, 2021
1 parent 6952929 commit 925d253
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,24 @@ The tool allows to dump binary API of a Kotlin library that is public in sense o

## Setup

Binary compatibility validator is a Gradle plugin that is added to the `build.gradle` in the following way:
Binary compatibility validator is a Gradle plugin that can be added to your build in the following way:

- in `build.gradle.kts`
```kotlin
plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.4.0"
}
```
ext.validator_version = "0.4.0"

buildscript {
dependencies {
classpath "org.jetbrains.kotlinx:binary-compatibility-validator:$validator_version"
}
- in `build.gradle`

```groovy
plugins {
id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.4.0'
}
apply plugin: 'binary-compatibility-validator'
```

It is enough to apply the plugin only to the root configuration file; all sub-projects will be configured automatically.
It is enough to apply the plugin only to the root project build file; all sub-projects will be configured automatically.

### Tasks

Expand Down Expand Up @@ -87,7 +90,7 @@ apiValidation {

Kotlin
```kotlin
configure<kotlinx.validation.ApiValidationExtension> {
apiValidation {
/**
* Packages that are excluded from public API dumps even if they
* contain public API.
Expand Down

0 comments on commit 925d253

Please sign in to comment.