apply from: "https://raw.githubusercontent.com/Fuzss/modresources/main/gradle/${libs.versions.minecraft.get()}/forge.gradle"

configurations {
    commonNeoForgeApi
    shadowCommonNeoForgeApi
    compileClasspath.extendsFrom common, commonNeoForgeApi
    runtimeClasspath.extendsFrom common, commonNeoForgeApi
    developmentForge.extendsFrom common, commonNeoForgeApi
}

dependencies {
    // Common Project
    commonNeoForgeApi(project(path: ":Common-NeoForgeApi", configuration: "namedElements")) { transitive false }
    shadowCommonNeoForgeApi(project(path: ":Common-NeoForgeApi", configuration: "transformProductionForge")) { transitive false }

    // Mixin Extras
    include libs.mixinextras.forge

    // Puzzles Lib
//    modApi libs.puzzleslib.forge
}

tasks.named("shadowJar") {
    configurations = [project.configurations.shadowCommon, project.configurations.shadowCommonNeoForgeApi]
}

sourcesJar {
    def commonNeoForgeApiSources = project(":Common-NeoForgeApi").sourcesJar
    dependsOn(commonNeoForgeApiSources)
    from commonNeoForgeApiSources.archiveFile.map { zipTree(it) }
}
