plugins {
    id 'net.neoforged.moddev'
}

neoForge {
    version = neoforge_version
    // Automatically enable AccessTransformers if the file exists
    def at = file('src/main/resources/META-INF/accesstransformer.cfg')
    if (at.exists()) {
        accessTransformers.from(at.absolutePath)
    }
    parchment {
        minecraftVersion = parchment_minecraft
        mappingsVersion = parchment_version
    }
}

repositories {
    maven { url = 'https://maven.bawnorton.com/releases' }
    maven { url 'https://api.modrinth.com/maven' }
}

dependencies {
    implementation("io.github.llamalad7:mixinextras-common:${mixinextras_version}")
    annotationProcessor("io.github.llamalad7:mixinextras-common:${mixinextras_version}")
    compileOnly("org.spongepowered:mixin:${mixin_version}")
    implementation(annotationProcessor("com.github.bawnorton.mixinsquared:mixinsquared-common:${mixinsquared_version}"))
    implementation("org.ow2.asm:asm:9.8")
    implementation("org.ow2.asm:asm-tree:9.8")
    compileOnly 'org.projectlombok:lombok:1.18.32'
    annotationProcessor 'org.projectlombok:lombok:1.18.32'
    implementation 'maven.modrinth:lithium:mc1.21.8-0.18.0-neoforge'
}

configurations {
    commonJava {
        canBeResolved = false
        canBeConsumed = true
    }
    commonResources {
        canBeResolved = false
        canBeConsumed = true
    }
}

artifacts {
    commonJava sourceSets.main.java.sourceDirectories.singleFile
    commonResources sourceSets.main.resources.sourceDirectories.singleFile
}
