gradle
8.3

# finalizeValue

abstract fun finalizeValue()

Calculates the final value of this object and disallows further changes to this object.

To calculate the final value of this object any source for the value is queried and the result used as the final value for this object. The source is discarded so that this object no longer tracks the value of the source.

Subsequent attempts to change the value of this object or to replace the source from which the value is derived will fail with an exception.

Note that although the value of this object will no longer change, the value may itself be mutable. Calling this method does not guarantee that the value will become immutable, though some implementations may support this.

If the value of this object is already final, this method does nothing.