pluginManagement {
    repositories {
        mavenLocal()
        mavenCentral()
        gradlePluginPortal()

        maven {
            name("Fabric")
            url("https://maven.fabricmc.net")
        }

        maven {
            name("Jitpack")
            url("https://jitpack.io")
        }

        maven {
            name("Nyan Maven")
            url("https://maven.hendrixshen.top")
        }
    }
    resolutionStrategy {
        eachPlugin {
            switch (requested.id.id) {
                case "com.replaymod.preprocess": {
                    useModule("com.github.Fallen-Breath:preprocessor:${requested.version}")
                    break
                }
            }
        }
    }
}

def versions = Arrays.asList(
        "1.20.1",
        "1.20.4",
        "1.20.6",
        "1.21.1",
        "1.21.3"
)

for (String version : versions) {
    include(":$version")
    def proj = project(":$version")
    proj.projectDir = file("versions/$version")
    proj.buildFileName = "../../common.gradle"
}
