-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
106 lines (83 loc) · 3.06 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
plugins {
id 'fabric-loom' version '0.4-SNAPSHOT'
}
apply plugin: 'maven-publish' // for uploading to a maven repo
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
maven { name="BuildCraft"; url="https://mod-buildcraft.com/maven" }
}
archivesBaseName = "SimplePipes"
version = "0.4.7"
minecraft {
}
dependencies {
minecraft "com.mojang:minecraft:1.16.2"
mappings "net.fabricmc:yarn:1.16.2+build.19:v2"
modImplementation "net.fabricmc:fabric-loader:0.9.1+build.205"
//Fabric api
modImplementation "net.fabricmc.fabric-api:fabric-api:0.18.0+build.397-1.16"
// Silk API
// modCompile "io.github.prospector.silk:SilkAPI:1.2.3-38"
modApi "alexiil.mc.lib:libblockattributes-all:$libblockattributes_version"
modApi "alexiil.mc.lib:libnetworkstack-base:$libnetworkstack_version"
modApi "alexiil.mc.lib:libmultipart-base:$libmultipart_version"
include "alexiil.mc.lib:libblockattributes-all:$libblockattributes_version"
include "alexiil.mc.lib:libnetworkstack-base:$libnetworkstack_version"
include "alexiil.mc.lib:libmultipart-base:$libmultipart_version"
// Misc
compile "com.google.code.findbugs:jsr305:3.0.1"
testCompile "junit:junit:4.12"
}
// 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"
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
publishing {
repositories {
maven {
url System.getenv("MAVEN_DIR") ?: "$projectDir/build/maven"
}
}
}
// #####################
//
// Extra jar section
//
// #####################
apply from: "extra_jar_def.gradle"
// Variables (that should be changed)
ext.mainName = "simplepipes"
ext.mavenGroupId = "alexiil.mc.mod";
ext.extra_jar_def__fabric_mod_json_replacements = [
["\$version", project.version],
["\$libblockattributes_version", "$libblockattributes_version"],
["\$libnetworkstack_version", "$libnetworkstack_version"],
["\$libmultipart_version", "$libmultipart_version"]
];
ext.extra_jar_def__optimised_compression = true;
ext.extra_jar_def__decompress_external_included = true;
def allIncludes = [
"assets/simple_pipes/icon_container.png"
];
def jarDeps = [
["alexiil.mc.lib", "libblockattributes-all", "$libblockattributes_version"],
["alexiil.mc.lib", "libnetworkstack-base", "$libnetworkstack_version"],
["alexiil.mc.lib", "libmultipart-base", "$libmultipart_version"]
];
generateJar("base", ["**"], [], true);
generateJar("all", allIncludes, [], false, [], ["base"], [], jarDeps);
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
}