Interface InternalInvalidatableVirtualFileSystemConnection

  • All Superinterfaces:
    InternalProtocolInterface

    public interface InternalInvalidatableVirtualFileSystemConnection
    extends InternalProtocolInterface
    Mixed into a provider connection, to allow notifying the daemon about changed paths.

    DO NOT CHANGE THIS INTERFACE - it is part of the cross-version protocol.

    Consumer compatibility: This method is used by all consumer versions from 6.1.

    Provider compatibility: This method is implemented by all provider versions from 6.1.

    Since:
    6.1
    See Also:
    ConnectionVersion4
    • Method Detail

      • notifyDaemonsAboutChangedPaths

        void notifyDaemonsAboutChangedPaths​(java.util.List<java.lang.String> changedPaths,
                                            BuildParameters parameters)
        Notifies all daemons about file changes made by an external process, like an IDE.

        The daemons will use this information to update the retained file system state.

        The paths which are passed in need to be absolute, canonicalized paths. For a delete, the deleted path should be passed. For a rename, the old and the new path should be passed. When creating a new file, the path to the file should be passed.

        The call is synchronous, i.e. the method ensures that the changed paths are taken into account by the daemon after it returned. This ensures that for every build started after this method has been called knows about the changed paths.

        If the version of Gradle does not support virtual file system retention (i.e. < 6.1), then the operation is a no-op.

        Consumer compatibility: This method is used by all consumer versions from 6.1.

        Provider compatibility: This method is implemented by all provider versions from 6.1.

        Parameters:
        changedPaths - Absolute paths which have been changed by the external process.
        Throws:
        UnsupportedVersionException - When the target Gradle version is <= 2.5.
        GradleConnectionException - On some other failure using the connection.
        Since:
        6.1