pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
plugins {
    id 'org.gradle.toolchains.foojay-resolver-convention' version '0.10.0'
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.name = "AndroidCast"
include ':app'
include ':session-studio'
project(':session-studio').projectDir = file('desktop/session-studio')

def wgTunnelSrc = file('third-party/wireguard-android/tunnel')
if (!wgTunnelSrc.isDirectory()) {
    throw new GradleException(
        'Missing third-party/wireguard-android/tunnel — run:\n' +
        '  git submodule update --init --recursive third-party/wireguard-android\n' +
        '  bash scripts/init-wireguard-submodule.sh'
    )
}
include ':tunnel'
project(':tunnel').projectDir = file('gradle/wireguard-tunnel')
