nageyqma·git
HTTPS https://git.nageyqma.icu/nageyqma/blade-addons-next.git SSH git@git.nageyqma.icu:nageyqma/blade-addons-next.git

HTTPS 链接可直接 git clone;推送代码请使用 SSH。

3.1 KB · 107 行raw
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
plugins {
    id 'net.fabricmc.fabric-loom' version "${loom_version}"
    id 'maven-publish'
}

version = project.mod_version
group = project.maven_group

base {
    archivesName = project.archives_base_name
}

java {
    toolchain.languageVersion = JavaLanguageVersion.of(25)
    // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
    // if it is present.
    // If you remove this line, sources will not be generated.
    withSourcesJar()
}

loom {
    runConfigs.named("client") {
        setIdeConfigGenerated(true)
        vmArgs("-XX:+IgnoreUnrecognizedVMOptions",
                "-Dmixin.debug.export=true",
                "-XX:+AllowEnhancedClassRedefinition")
//                "-Ddevauth.enabled=true",
//                "-Ddevauth.account=main")
    }

    runConfigs.named("server") {
        setIdeConfigGenerated(false)
    }
}

repositories {
    maven { url = uri("libs-local/maven") }
    mavenCentral()
    maven { url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" }
    maven { url = 'https://jitpack.io' }
    maven { url = "https://maven.terraformersmc.com/" }
    maven { url = 'https://repo.hypixel.net/repository/Hypixel/' }

}

dependencies {
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    implementation "net.fabricmc:fabric-loader:${project.loader_version}"
    implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
    include implementation("net.hypixel:mod-api:${project.hypixel_api_version}")
    include implementation("com.github.BladeMasterGabe:practical-config:${project.practical_config_version}")

    runtimeOnly("me.djtheredstoner:DevAuth-fabric:${project.dev_auth_version}")
    compileOnly("com.terraformersmc:modmenu:${project.modmenu_version}")

}

processResources {
    inputs.property "version", project.version

    filesMatching("fabric.mod.json") {
        expand "version": inputs.properties.version
    }
}

tasks.withType(JavaCompile).configureEach {
    it.options.release = 25
}

java {
    // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
    // if it is present.
    // If you remove this line, sources will not be generated.
    withSourcesJar()

    sourceCompatibility = JavaVersion.VERSION_25
    targetCompatibility = JavaVersion.VERSION_25
}

jar {
    def projectName = project.name
    inputs.property "projectName", projectName

    from("LICENSE") {
        rename { "${it}_$projectName" }
    }
}

// configure the maven publication
publishing {
    publications {
        create("mavenJava", MavenPublication) {
            artifactId = project.archives_base_name
            from components.java
        }
    }

    // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
    repositories {
        // Add repositories to publish to here.
        // Notice: This block does NOT have the same function as the block in the top level.
        // The repositories here will be used for publishing your artifact, not for
        // retrieving dependencies.
    }
}