plugins {
    id 'multiloader-common'
    id 'net.neoforged.moddev.legacyforge'
}

legacyForge {
    mcpVersion = minecraft_version
    if (file("src/main/resources/META-INF/accesstransformer.cfg").exists()) {
        accessTransformers = ["src/main/resources/META-INF/accesstransformer.cfg"]
    }
    parchment {
        minecraftVersion = parchment_minecraft
        mappingsVersion = parchment_version
    }
}

dependencies {
    compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5'
    implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
}

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

artifacts {
    commonJava sourceSets.main.java.sourceDirectories.singleFile
    commonResources sourceSets.main.resources.sourceDirectories.singleFile, file('src/generated/resources')
}

clean {
    delete 'generated'
}
