-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
89 lines (76 loc) · 2.61 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
89
plugins {
id 'application'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
repositories {
maven { url 'https://maven.fabricmc.net' }
mavenCentral()
}
application {
mainClassName = 'eu.the5zig.fabric.TransformerMain'
}
configurations {
embed
compile.extendsFrom embed
}
dependencies {
//embed "com.mojang:minecraft:${project.minecraft_version}"
embed "net.fabricmc:fabric-loader:${project.loader_version}"
embed "net.fabricmc:tiny-remapper:0.3.1.72"
embed "net.fabricmc:yarn:${project.yarn_mappings}"
embed group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
embed group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.3'
embed 'net.fabricmc:tiny-mappings-parser:0.2.2.14'
embed group: 'commons-io', name: 'commons-io', version: '2.8.0'
embed group: 'com.google.guava', name: 'guava', version: '29.0-jre'
}
jar {
from {
duplicatesStrategy DuplicatesStrategy.EXCLUDE
configurations.embed.collect {
it.isDirectory() ? it : zipTree(it)
}
}
exclude 'LICENSE.txt'
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.version
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
/*
* Copyright (c) 2019-2020 5zig Reborn
*
* This file is part of 5zig-fabric
* 5zig-fabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 5zig-fabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with 5zig-fabric. If not, see <http://www.gnu.org/licenses/>.
*/
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
jar {
from "LICENSE"
manifest.attributes('Main-Class': application.mainClassName)
}