options-profiles/common/build.gradle
2026-03-29 01:17:10 -04:00

62 lines
No EOL
2.1 KiB
Groovy

plugins {
id 'multiloader-common'
id 'net.neoforged.moddev'
}
neoForge {
neoFormVersion = neo_form_version
// Automatically enable AccessTransformers if the file exists
def at = file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.from(at.absolutePath)
}
}
dependencies {
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5'
// fabric and neoforge both bundle mixinextras, so it is safe to use it in common
compileOnly group: 'io.github.llamalad7', name: 'mixinextras-common', version: '0.3.5'
annotationProcessor group: 'io.github.llamalad7', name: 'mixinextras-common', version: '0.3.5'
// Mod implementations
implementation "maven.modrinth:sodium:mc26.1-0.8.7-fabric" // Sodium
implementation "maven.modrinth:sodium-extra:mc26.1-0.8.5+fabric" // Sodium Extra
implementation "maven.modrinth:iris:1.10.8+26.1-fabric" // Iris
implementation "maven.modrinth:distanthorizons:2.4.5-b-1.21.11" // Distant Horizons
implementation "maven.modrinth:controlify:3.0.0-beta.3" // Controlify
}
configurations {
commonJava {
canBeResolved = false
canBeConsumed = true
}
commonResources {
canBeResolved = false
canBeConsumed = true
}
}
artifacts {
commonJava sourceSets.main.java.sourceDirectories.singleFile
commonResources sourceSets.main.resources.sourceDirectories.singleFile
}
// Implement mcgradleconventions loader attribute
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
configurations.named("$variant") {
attributes {
attribute(loaderAttribute, 'common')
}
}
}
sourceSets.configureEach {
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant->
configurations.named("$variant") {
attributes {
attribute(loaderAttribute, 'common')
}
}
}
}