You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently BCV uses vars for configuring behaviour.
This causes issues when configuring BCV, as the order of operations is now very sensitive to the order of configuration, and the interaction with different plugins. It also means that values must be computed lazily.
Lazy values also means that afterEvaluate {} can be avoided, which can also cause compatibility issues with other Gradle plugins, and should be avoided.
In order for BCV to follow best practices, properties that are compatible with the Gradle Provider API should be used instead.
For example:
FileCollection should be replaced with ConfigurableFileCollection
Currently BCV uses vars for configuring behaviour.
This causes issues when configuring BCV, as the order of operations is now very sensitive to the order of configuration, and the interaction with different plugins. It also means that values must be computed lazily.
Lazy values also means that
afterEvaluate {}
can be avoided, which can also cause compatibility issues with other Gradle plugins, and should be avoided.In order for BCV to follow best practices, properties that are compatible with the Gradle Provider API should be used instead.
For example:
FileCollection
should be replaced withConfigurableFileCollection
https://github.com/Kotlin/binary-compatibility-validator/blob/ad1bea6630508abc0ec2bb0fd516a90aa6786258/src/main/kotlin/KotlinKlibAbiBuildTask.kt#L34-L33
Primitive properties, like
Boolean
, should be replaced withProperty<Boolean>
https://github.com/Kotlin/binary-compatibility-validator/blob/ad1bea6630508abc0ec2bb0fd516a90aa6786258/src/main/kotlin/ApiValidationExtension.kt#L102-L101
Conventional values
Currently, the conventions for the non-lazy properties are configured in-place.
The Provider API allows for setting default conventions, and these should be set in the BinaryCompatibilityValidatorPlugin.
For example:
Further reading:
The text was updated successfully, but these errors were encountered: