Custom Gradle plugin crashes in Gradle v5.2.1, worked in v4.7?

I know that’s a HUGE version change.

I wrote a custom Gradle java plugin, and created a task called manageVersion. Here’s the entry plugin class itself

package com.zift.utilities;

import org.gradle.api.Plugin;
import org.gradle.api.Project;

public class ZiftVersionPlugin implements Plugin<Project> {
    public void apply(Project project) {
        project.getTasks().create("manageVersion", ZiftVersion.class, (task) -> {
            // Added breakpoint here, but it never broke

The code worked in Gradle v4.7, but not in v5.2.1. Here’s the core dump.

Any clues? Thanks!

I asked the same question in Stackoverflow Custom Gradle Java plugin crashes in v5.2.1, but worked in v4.7?, with a more thorough code and build.gradle file.

Any help on this would be appreciated. I just get lost in the Java code. Again I have a working example here.