-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathbuild.gradle
More file actions
50 lines (47 loc) · 1.44 KB
/
Copy pathbuild.gradle
File metadata and controls
50 lines (47 loc) · 1.44 KB
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
plugins {
id 'multiloader-loader'
id 'net.fabricmc.fabric-loom'
}
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
implementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
implementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
}
loom {
def aw = project(":$mod_id-common").file("src/main/resources/${mod_id}.accesswidener")
if (aw.exists()) {
accessWidenerPath.set(aw)
}
runs {
client {
client()
setConfigName('Fabric Client')
ideConfigGenerated(true)
runDir('runs/client')
}
server {
server()
setConfigName('Fabric Server')
ideConfigGenerated(true)
runDir('runs/server')
}
}
}
// Implement mcgradleconventions loader attribute
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements', 'includeInternal', 'modCompileClasspath'].each { variant ->
configurations.named("$variant") {
attributes {
attribute(loaderAttribute, 'fabric')
}
}
}
sourceSets.configureEach {
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant->
configurations.named("$variant") {
attributes {
attribute(loaderAttribute, 'fabric')
}
}
}
}