RyanHub - file viewer
filename: common/build.gradle
branch: 1.21
back to repo
architectury {
    common rootProject.enabled_platforms.split(',')
}

loom.accessWidenerPath.set(file("src/main/resources/oritech.accesswidener"))

dependencies {
    // We depend on Fabric Loader here to use the Fabric @Environment annotations,
    // which get remapped to the correct annotations on each platform.
    // Do NOT use other classes from Fabric Loader.
    // modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"

    // Architectury API. This is optional, and you can comment it out if you don't need it.
    modImplementation "dev.architectury:architectury:$rootProject.architectury_api_version"

    // owo lib (or owo-lib-neoforge)
    modImplementation "io.wispforest:owo-lib:0.12.15+1.21"
    annotationProcessor modImplementation("io.wispforest:owo-lib:0.12.15+1.21")

    // geckolib
    modImplementation "software.bernie.geckolib:geckolib-fabric-1.21.1:4.6.6"

    // EMI
    // modCompileOnly "dev.emi:emi-xplat-intermediary:${emi_version}:api"
    modCompileOnly "dev.emi:emi-fabric:${emi_version}"

    // REI
    modCompileOnly "me.shedaniel:RoughlyEnoughItems-api:16.0.754"

    // JEI
    modCompileOnly "mezz.jei:jei-${minecraft_version}-common-api-intermediary:19.21.0.246"

    // JADE (needed for addon)
    modImplementation "curse.maven:jade-324717:5639994"

    // oracle index
    modCompileOnly "curse.maven:oracle-index-1206582:6300146"

}

sourceSets {
    main {
        resources.srcDir "src/main/generated"
        resources.exclude ".cache"
        // exclude compat recipes from common because they're loader specific
        resources.exclude "**/compat"
    }
    fabric {
        // make compat recipes available to fabric build
        resources {
            srcDir "src/main/generated"
            include "**/compat/**"
        }
        output.resourcesDir = "data"
    }
}

tasks.withType(AbstractCopyTask).configureEach {
    setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}

tasks.named('processResources') {

    from("$rootDir/docs") {
        into "assets/oracle_index/books/oritech"
        exclude '.assets/item/**'   // items are rendered ingame as actual item components, no need to include them here
    }

    doLast {
        println "processResources executed: wiki folder copied into assets/oracle_index"
    }
}