plugins {
    id 'idea'
    id 'java'
    id 'maven-publish'
    id 'org.spongepowered.gradle.vanilla'
}
base {
    archivesName = "${mod_name}-common-${minecraft_version}"
}
minecraft {
    version(minecraft_version)
    if(file("src/main/resources/${mod_id}.accesswidener").exists()){
        accessWideners(file("src/main/resources/${mod_id}.accesswidener"))
    }
}

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

    // ComputerCraft
    compileOnly("cc.tweaked:cc-tweaked-$minecraft_version-common-api:$cc_version")

    compileOnly(files("./tardim-1.2.2-dev.jar"))
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifactId base.archivesName.get()
            from components.java
        }
    }
    repositories {
        maven {
            url "file://" + System.getenv("local_maven")
        }
    }
}