mirror of
https://github.com/trafficlunar/options-profiles.git
synced 2026-05-13 21:07:48 +00:00
49 lines
No EOL
1.4 KiB
Groovy
49 lines
No EOL
1.4 KiB
Groovy
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_api_version}"
|
|
}
|
|
|
|
loom {
|
|
def aw = project(':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')
|
|
}
|
|
}
|
|
}
|
|
} |