pluginManagement {
    repositories {
        gradlePluginPortal()
        maven { url = 'https://maven.minecraftforge.net/' }
        maven { url "https://repo.spongepowered.org/repository/maven-public/" }
    }
}
rootProject.name = "oc2r-${minecraft_version}-${minecraft_sdk}"

def substituteLocal(final directoryName, final libraryName) {
    final def path = new File("../${directoryName}")
    if (path.exists()) {
        println("Found local [${directoryName}] project, substituting...")
        includeBuild(path) {
            dependencySubstitution {
                substitute module(libraryName) using project(':')
            }
        }
    }
}

substituteLocal('sedna-mc', 'curse.maven:sedna-511276')
substituteLocal('ceres', 'li.cil.ceres:ceres')
substituteLocal('sedna', 'li.cil.sedna:sedna')
substituteLocal('minux', 'li.cil.sedna:sedna-buildroot')
