SourceSet Dependency Management
This example project configuration shows how to add dependencies to a specific source set.
- Groovy
- Kotlin
build.gradle
tableau {
mod {
// Mod information
modid = 'modid' // Use your own modid here.
group = 'com.example' // Use your own group here.
minecraftVersion = '1.21.3' // Or any other minecraft version.
publisher = 'SomePublisher' // Use your own name here.
url = 'https://github.com/someorg/modid' // Use your own URL here.
}
sourceSets {
main {
dependencies {
// Add a dependency to the main source set, which is the default source set
implementation 'com.google.guava:guava:30.1-jre'
}
}
}
}
build.gradle.kts
tableau {
mod {
// Mod information
modid.set("modid") // Use your own modid here.
group.set("com.example") // Use your own group here.
minecraftVersion.set("1.21.3") // Or any other minecraft version.
publisher.set("SomePublisher") // Use your own name here.
url.set("https://github.com/someorg/modid") // Use your own URL here.
}
sourceSets {
main {
dependencies {
// Add a dependency to the main source set, which is the default source set
implementation("com.google.guava:guava:30.1-jre")
}
}
}
}
This will add the Guava library as a dependency to the main source set.
note
You can find a full example of this project configuration in the CurseForge Publishing Example on GitHub.