/*
 * This file is part of spongegradle-repository, licensed under the MIT License (MIT).
 *
 * Copyright (c) SpongePowered <https://www.spongepowered.org>
 * Copyright (c) contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.spongepowered.gradle.repository;

import org.gradle.api.artifacts.dsl.RepositoryHandler;
import org.gradle.api.artifacts.repositories.MavenArtifactRepository;
import org.gradle.api.artifacts.repositories.MavenRepositoryContentDescriptor;

import javax.inject.Inject;

class SpongeRepositoryExtensionImpl implements SpongeRepositoryExtension {

    private static final String SPONGE_REPO_ROOT = "https://repo.spongepowered.org/repository/";

    private static final String SPONGE_MAVEN_PUBLIC = SPONGE_REPO_ROOT + "maven-public/";

    private static final String SPONGE_MAVEN_RELEASES = SPONGE_REPO_ROOT + "maven-releases/";

    private static final String SPONGE_MAVEN_SNAPSHOTS = SPONGE_REPO_ROOT + "maven-snapshots/";

    private final RepositoryHandler repositories;

    @Inject
    public SpongeRepositoryExtensionImpl(final RepositoryHandler repositories) {
        this.repositories = repositories;
    }

    @Override
    public MavenArtifactRepository all() {
        return this.repositories.maven(repo -> {
            repo.setUrl(SPONGE_MAVEN_PUBLIC);
        });
    }

    @Override
    public MavenArtifactRepository releases() {
        return this.repositories.maven(repo -> {
            repo.setUrl(SPONGE_MAVEN_RELEASES);
            repo.mavenContent(MavenRepositoryContentDescriptor::releasesOnly);
        });
    }

    @Override
    public MavenArtifactRepository snapshots() {
        return this.repositories.maven(repo -> {
            repo.setUrl(SPONGE_MAVEN_SNAPSHOTS);
            repo.mavenContent(MavenRepositoryContentDescriptor::snapshotsOnly);
        });
    }

}

@@ -2286,32 +2286,71 @@
 maven(repo -%3E %7B%0A
+            repo.setName(%22spongeAll%22);%0A
             repo
@@ -2379,16 +2379,16 @@
 UBLIC);%0A
-
         
@@ -2501,32 +2501,76 @@
 maven(repo -%3E %7B%0A
+            repo.setName(%22spongeReleases%22);%0A
             repo
@@ -2758,24 +2758,24 @@
 apshots() %7B%0A
-
         retu
@@ -2803,32 +2803,77 @@
 maven(repo -%3E %7B%0A
+            repo.setName(%22spongeSnapshots%22);%0A
             repo

Set names for repos