aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
blob: 68337a1c96cc16814a776fd7ccdd699e3149519e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
plugins {
    id 'fabric-loom' version '0.10-SNAPSHOT'
    id 'maven-publish'
}

version = project.mod_version + "+" + project.minecraft_version
group = project.maven_group

repositories {
    maven { url "https://maven.shedaniel.me/" }
    maven { url "https://maven.terraformersmc.com/releases" }
    maven { url "https://cursemaven.com" }
}

dependencies {
    // To change the versions see the gradle.properties file
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

    modImplementation fabricApi.module("fabric-api-base", "${project.fabric_api}")
    modImplementation fabricApi.module("fabric-resource-loader-v0", "${project.fabric_api}")
    modImplementation fabricApi.module("fabric-command-api-v1", "${project.fabric_api}")

    modCompileOnly("com.terraformersmc:modmenu:${project.modmenu}") {
        exclude(group: "net.fabricmc.fabric-api")
    }

    modCompileOnly("me.shedaniel.cloth:cloth-config-fabric:${project.cloth}") {
        exclude(group: "net.fabricmc.fabric-api")
    }

    modCompileOnly("curse.maven:cosmeticarmor-436659:${project.cosmetic_armor}")
}

processResources {
    inputs.property "version", project.version
    filteringCharset "UTF-8"

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

loom {
    accessWidenerPath = file("src/main/resources/citresewn.accesswidener")
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

java {
    archivesBaseName = project.archives_base_name
    // 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()
}

jar {
    from("LICENSE") {
        rename { "${it}_${project.archivesBaseName}" }
    }
}