Could not open cp_proj remapped class cache

I am attempting to use HttpBuilder-ng in gradle and I get an error message:

Could not open cp_proj remapped class cache for 8ewk9p70xsd6la1f0dzqq3ljd (/Users/nobody/.gradle/caches/3.5/scripts-remapped/build_15jnj681e3ffdu1t6mkw43eox/8ewk9p70xsd6la1f0dzqq3ljd/cp_proje3b9141dfcd49572d76236e88877494d).

Could not open cp_proj generic class cache for build file ‘/Users/nobody/projects/workday/git/current/workday-ixiasoft/scripts/translations/build.gradle’ (/Users/nobody/.gradle/caches/3.5/scripts/8ewk9p70xsd6la1f0dzqq3ljd/cp_proj/cp_proje3b9141dfcd49572d76236e88877494d).
groovyx/net/http/HttpBuilder

I’ve moved aside ~/.gradle and run gradle --stop and rerun my task using --no-daemon and get the same error message.

Incidentally, when I first ran the build I was using the class httpBuilder and then saw that it’s been renamed to ApacheHttpBuilder. So I tried using an import alias. But, I am getting the same error message without an import alias and starting with no ~/.gradle directory.

Do you know what can be done?