To resolve this issue you will have to take out the resolver in the Gradle run (i.e. comment out resolverId: "GRADLE_RESOLVER") or you can set this Gradle property in the settings.gradle:
The change in 4.0.1 and above of the Jenkins Artifactory plugin sets the RepositoriesMode.PREFER_SETTINGS Gradle property when utilized. So setting it to PREFER_PROJECT will cause the build to instead use the build.gradle configurations again.
dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_PROJECT) }
The change in 4.0.1 and above of the Jenkins Artifactory plugin sets the RepositoriesMode.PREFER_SETTINGS Gradle property when utilized. So setting it to PREFER_PROJECT will cause the build to instead use the build.gradle configurations again.