-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
75 lines (58 loc) · 1.96 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
plugins {
id 'idea'
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
}
def modprop = new Properties()
file("mod.properties").withInputStream { modprop.load(it) }
def buildprop = new Properties()
file("build.properties").withInputStream { buildprop.load(it) }
repositories {
maven {
url "https://maven.shedaniel.me/"
}
maven {
url "https://maven.terraformersmc.com/"
}
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceCompatibility = compileJava.sourceCompatibility = '1.8'
targetCompatibility = compileJava.targetCompatibility = '17'
version = "${buildprop.game_version}-${modprop.version}"
group = modprop.group
archivesBaseName = modprop.name
dependencies {
minecraft "com.mojang:minecraft:${buildprop.game_version}"
mappings "net.fabricmc:yarn:${buildprop.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${buildprop.fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${buildprop.fabric_api_version}"
modApi("me.shedaniel.cloth:cloth-config-fabric:${buildprop.cloth_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation "com.terraformersmc:modmenu:${buildprop.menu_version}"
implementation "org.jetbrains:annotations:${buildprop.jba_version}"
compileOnly "org.projectlombok:lombok:${buildprop.lombok_version}"
annotationProcessor "org.projectlombok:lombok:${buildprop.lombok_version}"
testCompileOnly "org.projectlombok:lombok:${buildprop.lombok_version}"
testAnnotationProcessor "org.projectlombok:lombok:${buildprop.lombok_version}"
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
def targetVersion = 8
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetVersion
}
}
java {
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}