forked from AViewFromTheTop/SimpleCopperPipesMC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
174 lines (145 loc) · 3.23 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
id 'eclipse'
id 'idea'
id 'java-library'
}
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
loom {
runtimeOnlyLog4j = true
mixin {
defaultRefmapName = "mixins.copper_pipe.refmap.json"
}
accessWidenerPath = file("src/main/resources/copper_pipe.accesswidener")
interfaceInjection {
// When enabled, injected interfaces from dependencies will be applied.
enableDependencyInterfaceInjection = false
}
}
configurations {
includeModImplementation
includeImplementation
include.extendsFrom includeImplementation
include.extendsFrom includeModImplementation
implementation.extendsFrom includeImplementation
modImplementation.extendsFrom includeModImplementation
}
repositories {
maven {
url = 'https://jitpack.io'
}
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
maven {
url = 'https://maven.terraformersmc.com'
content {
includeGroup "com.terraformersmc"
}
}
maven {
url = 'https://maven.shedaniel.me/'
}
maven {
url 'https://cursemaven.com'
content {
includeGroup "curse.maven"
}
}
/*maven {
name "Siphalor's Maven"
url "https://maven.siphalor.de"
}*/
maven {
url "https://maven.flashyreese.me/releases"
}
maven {
url "https://maven.flashyreese.me/snapshots"
}
maven {
url = 'https://maven.minecraftforge.net/'
}
maven {
url = 'https://maven.parchmentmc.org'
}
maven {
url = "https://minecraft.guntram.de/maven/"
}
maven {
name = 'Quilt'
url = 'https://maven.quiltmc.org/repository/release'
}
flatDir {
dirs 'libs'
}
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings(loom.layered {
// please annoy treetrain if this doesnt work
it.officialMojangMappings {
setNameSyntheticMembers(false)
}
})
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
//modImplementation "de.guntram.mcmod:crowdin-translate:1.4+1.19"
//include "de.guntram.mcmod:crowdin-translate:1.4+1.19"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
javadoc {
options.tags = ["reason"]
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
options.fork = true
options.incremental = true
}
tasks.withType(Test).configureEach {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
}
}