Use https to talk to the plugin portal.
Define the base URL as the path to the start of the Gradle API instead of the base of the application.

Without this change, we are forcing all resolution services to have /api/gradle in the path of their endpoint.
Reinstate detecting if the user is trying to apply a non-core plugin already on the classpath via plugins {}