-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
36 lines (29 loc) · 2.05 KB
/
build.gradle
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
plugins { id 'fabric-loom' version '1.6-SNAPSHOT' }
base { archivesName = project.archives_base_name }
version = "${project.chyma_version}+${project.minecraft_version}"
repositories { // You should only use this when depending on other mods
maven { url = "https://api.modrinth.com/maven"; content { includeGroup "maven.modrinth" } }
maven { name = "JourneyMap (Public)"; url = "https://jm.gserv.me/repository/maven-public/" }
maven { url "https://www.cursemaven.com" }
}
configurations.all { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' }
// Check for snapshots more frequently than Gradle's default of 1 day. 0 = every build.
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
// mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "maven.modrinth:customhud:${project.customhud_version}"
modCompileOnlyApi group: 'info.journeymap', name: 'journeymap-api-fabric', version: project.journeymap_api_version, changing: true
} // prevent intelliJ from auto-creating the 'Minecraft Server' run config, you can safely delete this
loom { runConfigs.client { ideConfigGenerated(true) }; runConfigs.server { ideConfigGenerated(false) } }
tasks.withType(JavaCompile).configureEach { it.options.release = 21 }
java { withSourcesJar() // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
sourceCompatibility = JavaVersion.VERSION_21;
targetCompatibility = JavaVersion.VERSION_21
} // if it is present. If you remove this line, sources will not be generated.
jar { from("LICENSE") { rename { "${it}_${project.base.archivesName.get()}" }}}
processResources { // converts the "version": "${version}" in the fabric.mod.json to the actual version as defined on line 3 of build.gradle
inputs.property "version", project.version; filesMatching("fabric.mod.json") { expand "version": project.version }
}