Skip to content

v2.0.0 Respect access level

Latest

Choose a tag to compare

@alschmut alschmut released this 19 Oct 14:30

Breaking change

  • Previously the generated builder would always have the implicit internal access level. Starting with v2.0.0 by default the generated builder adopts the same access level of the original annotated struct/class/enum.

New Features

  • To adjust the access level of the builder, set the new desired accessLevel macro parameter @Buildable(accessLevel: AccessLevel? = nil) to one of the following values: private, fileprivate, internal, package or public. The desired access level must not be of higher visibility than the original struct/class/enum.
  • The macro now generates explicit initializers when the builder's accessLevel is package or public
  • The swift-syntax dependency can now be resolved with older versions as well. The minimum version is 600.0.0

Internal updates

Fixes

  • Fix an issue, where the builder fails to be generated when the original struct or class has a fileprivate variable.