Class LockfileAccess

java.lang.Object
com.arc_e_tect.gradle.apionly.subscriber.LockfileAccess
All Implemented Interfaces:
org.gradle.api.services.BuildService<org.gradle.api.services.BuildServiceParameters.None>

public abstract class LockfileAccess extends Object implements org.gradle.api.services.BuildService<org.gradle.api.services.BuildServiceParameters.None>
Serialises access to one project's apionly.lock.

Every fetch and every verification in a project reads or writes the same lockfile, and Gradle may run a project's tasks in parallel, as it does with the configuration cache. Two fetches recording their entries at the same moment would each write back what they read, and one entry would be lost. The plugin registers one of these per project, permitting a single usage at a time, and every fetch and verify task in that project uses it.

  • Constructor Details

    • LockfileAccess

      public LockfileAccess()
      Creates the service. Gradle instantiates it when a task that uses it runs.