Storing project instance in Project object

According to Gradle documentation, it says that there is a guarantee that when apply() is called on a Plugin<Project>, that it will always be called with the same project. (It’s possibly a stronger guarantee.)

So, is this safe, then?

abstract class AbstractMyPlugin : Plugin<Project> {
    protected lateinit var project: Project
    
    abstract fun doApply()
    
    final override fun apply(project: Project) {
        this.project = project
        doApply()
    }
}

I’m not fully sure, but I don’t think that is a good idea. Better do not save a reference to the project. A plugin should configure a project, apply other plugins, register extensions, register tasks, set default values, wire things together, …
It should not be necessary to save a project instance.