summaryrefslogtreecommitdiff
path: root/archenemyexample/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'archenemyexample/build.gradle.kts')
-rw-r--r--archenemyexample/build.gradle.kts47
1 files changed, 37 insertions, 10 deletions
diff --git a/archenemyexample/build.gradle.kts b/archenemyexample/build.gradle.kts
index 6ed1dbe..946264e 100644
--- a/archenemyexample/build.gradle.kts
+++ b/archenemyexample/build.gradle.kts
@@ -7,8 +7,16 @@ plugins {
repositories {
mavenCentral()
+ maven("https://maven.fabricmc.net")
}
+val minecraft = mojang.minecraft("1.20.2", MCSide.CLIENT) as ModuleDependency
+val officialMappings = mojang.officialMappings(
+ "1.20.2", MCSide.CLIENT
+)
+val yarnMappings = mojang.yarnMappings(dependencies.create("net.fabricmc:yarn:1.20.2+build.4:v2"))
+val intermediaryMappings = mojang.yarnMappings(dependencies.create("net.fabricmc:intermediary:1.20.2:v2"))
+val whateverAttribute = Attribute.of("whatever", String::class.java)
kotlin {
val allJvm by sourceSets.creating {
this.dependencies {
@@ -16,23 +24,42 @@ kotlin {
}
jvm("forge") {
+ attributes.attribute(whateverAttribute, "forge")
compilations.named("main").get().run {
defaultSourceSet.dependsOn(allJvm)
this.dependencies {
- val mappedMinecraft = mojang.mapJar(
- mojang.minecraft("1.20.2", MCSide.CLIENT) as ModuleDependency,
- mojang.officialMappings("1.20.2", MCSide.CLIENT),
+ implementation(
+ mojang.mapJar(
+ minecraft,
+ officialMappings,
+ "official",
+ "named"
+ )
+ )
+ }
+ }
+ }
+ jvm("fabric") {
+ attributes.attribute(whateverAttribute, "fabric")
+ compilations.named("main").get().run {
+ defaultSourceSet.dependsOn(allJvm)
+ this.dependencies {
+ val thingy = mojang.mapJar(
+ minecraft,
+ intermediaryMappings,
"official",
- "named"
+ "intermediary"
+ )
+ implementation(
+ mojang.mapJar(
+ thingy as ModuleDependency,
+ yarnMappings,
+ "intermediary",
+ "named"
+ )
)
- implementation(mappedMinecraft)
}
}
}
-// jvm("fabric") {
-// compilations.named("main").get().run {
-// defaultSourceSet.dependsOn(allJvm)
-// }
-// }
}