-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
88 lines (72 loc) · 2.64 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
86
87
88
import java.nio.charset.StandardCharsets
import java.time.Year
plugins {
id "fabric-loom" version "0.2.0-SNAPSHOT"
id "com.matthewprenger.cursegradle" version "1.1.2"
id "net.minecrell.licenser" version "0.2.1"
id "maven-publish"
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
group = "com.github.GlassPane"
archivesBaseName = "Fabric-Base-Mod"
version = System.getenv("TRAVIS_TAG") ?: project.mod_version
println("Setting version: " + version)
apply from: "https://raw.githubusercontent.com/NerdHubMC/Gradle-Scripts/master/scripts/fabric/basic_project.gradle"
apply from: "https://raw.githubusercontent.com/NerdHubMC/Gradle-Scripts/master/scripts/fabric/dependencies/development_suite.gradle"
processResources {
// this will ensure that this task is redone when there"s a change
inputs.property "version", project.version
// replace stuff in fabric.mod.json, nothing else
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
// add mod metadata
expand "version": project.version /*, "changelog_url": project.changelog_url,
"curseforge_id": project.curseforge_id, "license": project.license_header*/
filter { String line ->
line.replace("\"fabric\": \"*\"", "\"fabric\": \"[${project.fabric_version},)\"")
}
}
// copy everything else, that"s not the fabric.mod.json
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
repositories {
maven {
name = "NerdHubMC"
url = "https://maven.abusedmaster.xyz"
}
maven {
name = "FabricMC"
url = "https://maven.fabricmc.net"
}
maven {
name = "JitPack"
url = "https://jitpack.io"
}
}
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings "net.fabricmc:yarn:${yarn_mappings}"
modCompile "net.fabricmc:fabric-loader:${loader_version}"
modCompile "com.github.GlassPane:Mesh:${mesh_version}"
//optional dependency!
modCompile "net.fabricmc:fabric:${fabric_version}"
}
license {
header = file("code_quality/${project.license_header}_HEADER.txt")
// Apply licenses only to main source set
sourceSets = [project.sourceSets.main]
include "**/*.java"
charset = StandardCharsets.UTF_8.name()
style {
java = "BLOCK_COMMENT"
}
newLine = false // Disables the empty line between the header and package name
//ignoreFailures = true //Ignore failures and only print a warning on license violations
//export variables
ext {
year = Year.now()
projectDisplayName = project.archivesBaseName
}
}