class BasePlugin implements Plugin<Project>, ToolingRegistryProvider {

    @VisibleForTesting
    static Proxy createProxy(@NonNull Properties properties, @NonNull ILogger logger) {
        String host = properties.getProperty("https.proxyHost");
        int port = 443;
        if (host != null) {
            String maybePort = properties.getProperty("https.proxyPort");
            if (maybePort != null) {
                try {
                    port = Integer.parseInt(maybePort);
                } catch (NumberFormatException e) {
                    logger.lifecycle(
                            "Invalid https.proxyPort '" + maybePort + "', using default 443");
                }
            }
        }
        else {
            host = properties.getProperty("http.proxyHost");
            //noinspection VariableNotUsedInsideIf
            if (host != null) {
                port = 80;
                String maybePort = properties.getProperty("http.proxyPort");
                if (maybePort != null) {
                    try {
                        port = Integer.parseInt(maybePort);
                    } catch (NumberFormatException e) {
                        logger.lifecycle(
                                "Invalid http.proxyPort '" + maybePort + "', using default 80");
                    }
                }
            }
        }
        if (host != null) {
            InetSocketAddress proxyAddr = createAddress(host, port);
            if (proxyAddr != null) {
                return new Proxy(Proxy.Type.HTTP, proxyAddr);
            }
        }
        return Proxy.NO_PROXY;

    }

      BasePlugin(@NonNull ToolingModelBuilderRegistry registry);

}