-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (70 loc) · 2.28 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
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
plugins {
id "fabric-loom" version "0.2.6-SNAPSHOT"
id "java"
id "com.github.breadmoirai.github-release" version "2.2.10"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = project.mod_id
}
minecraft {
refmapName = "${project.mod_id}-refmap.json"
}
version = "${project.mod_version}+${project.minecraft_version}"
group = project.maven_group
repositories {
maven { url "https://tehnut.info/maven/" }
}
dependencies {
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings("net.fabricmc:yarn:${minecraft_version}+${yarn_version}:v2")
modImplementation("net.fabricmc:fabric-loader:${loader_version}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabric_api_version}")
modImplementation("me.shedaniel:RoughlyEnoughItems:${rei_version}")
{
exclude(group: "net.fabricmc", module: "fabric-loader")
exclude(group: "net.fabricmc.fabric-api")
exclude(group: "io.github.prospector", module: "modmenu")
}
modImplementation("io.github.prospector:modmenu:${modmenu_version}")
{
exclude (group: "net.fabricmc", module: "fabric-loader")
exclude (group: "net.fabricmc.fabric-api")
}
compileOnly("org.checkerframework:checker-qual:3.0.1")
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include("fabric.mod.json")
expand("version": version)
}
from(sourceSets.main.resources.srcDirs) {
exclude("fabric.mod.json")
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
jar { from("LICENSE") }
runClient {
args = ["--username", "Dev"]
}
tasks.withType(JavaCompile) { options.setEncoding("UTF-8") }
if(project.hasProperty("github_api_key"))
{
tasks.getByName("githubRelease") {
dependsOn(tasks.getByName("build"))
}
githubRelease {
token = project.github_api_key
owner "ninjaphenix"
repo "container-lib"
tagName "v${project.mod_version}"
targetCommitish project.minecraft_version
releaseAssets remapJar.destinationDirectory.getAsFile().get().listFiles((java.io.FilenameFilter) {dir, name -> name.contains(project.mod_version)})
overwrite true
}
}