plugins {
    id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
    id "at.petra-k.PKSubprojPlugin"
}

pkSubproj {
    platform "common"
}

minecraft {
    version(minecraftVersion)
    accessWideners 'src/main/resources/hexplat.accesswidener'
}

repositories {
    mavenCentral()

    maven { url 'https://maven.blamejared.com' }

    maven {
        // location of the maven that hosts JEI files
        name = "Progwml6 maven"
        url = "https://dvs1.progwml6.com/files/maven/"
    }
    maven {
        // location of a maven mirror for JEI files, as a fallback
        name = "ModMaven"
        url = "https://modmaven.dev"
    }

    maven { url "https://maven.shedaniel.me/" }

}

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

    compileOnly "at.petra-k.paucal:paucal-common-$minecraftVersion:$paucalVersion"
    compileOnly "vazkii.patchouli:Patchouli-xplat:$minecraftVersion-$patchouliVersion-SNAPSHOT"

    compileOnly "com.samsthenerd.inline:inline-forge:$minecraftVersion-$inlineVersion"

    compileOnly "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
    testCompileOnly "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"

    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.1'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.1'
}

test {
    useJUnitPlatform()
}

processResources {
    def buildProps = project.properties.clone()

    filesMatching(['pack.mcmeta']) {
        expand buildProps
    }
}
