pluginManagement {
    repositories {
        maven {
            name = 'Fabric'
            url = 'https://maven.fabricmc.net/'
        }
        mavenCentral()
        gradlePluginPortal()
    }
    // Lets the root build say `id 'fabric-loom'` without repeating the version,
    // so loom_version lives in exactly one place (gradle.properties).
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == 'fabric-loom') {
                useModule("net.fabricmc:fabric-loom:${settings.loom_version}")
            }
        }
    }
}

plugins {
    id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
}

rootProject.name = 'photosync'

// ---------------------------------------------------------------------------
// Shared modules. These carry no Minecraft dependency at all and are compiled
// to the lowest bytecode level we must support (Java 17, for 1.20-1.20.4).
// ---------------------------------------------------------------------------
include 'shared:core'
include 'shared:mc-api'
include 'shared:ui'
include 'shared:client'

// ---------------------------------------------------------------------------
// Platform modules. One per compatibility bucket -- NOT one per Minecraft
// version. Each bucket's representative version is the one we compile and test
// against; the other versions it covers are declared in fabric.mod.json.
//
// See docs/PORTING.md for the empirical breakpoints behind this grouping.
// ---------------------------------------------------------------------------
include 'platform:1.20.1'
include 'platform:1.20.4'
include 'platform:1.20.6'
include 'platform:1.21.1'
include 'platform:1.21.4'
include 'platform:1.21.5'
include 'platform:1.21.8'
include 'platform:1.21.11'
include 'platform:26.2'
