summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archenemyexample/build.gradle.kts2
-rw-r--r--plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemyMojangExtension.kt7
2 files changed, 7 insertions, 2 deletions
diff --git a/archenemyexample/build.gradle.kts b/archenemyexample/build.gradle.kts
index 946264e..fae9a49 100644
--- a/archenemyexample/build.gradle.kts
+++ b/archenemyexample/build.gradle.kts
@@ -14,7 +14,7 @@ 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 intermediaryMappings = mojang.intermediaryMappings("1.20.2")
val whateverAttribute = Attribute.of("whatever", String::class.java)
kotlin {
diff --git a/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemyMojangExtension.kt b/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemyMojangExtension.kt
index db667ae..8125900 100644
--- a/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemyMojangExtension.kt
+++ b/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemyMojangExtension.kt
@@ -52,12 +52,17 @@ abstract class ArchenemyMojangExtension(val project: Project) {
return OfficialMappingDependency(side, version, project.providers.provider { dependency })
}
+ fun intermediaryMappings(version: String): MappingDependency {
+ return yarnMappings(project.dependencies.create("net.fabricmc:intermediary:$version:v2"))
+ }
+
fun mapJar(
- dependency: ModuleDependency,
+ dependency: Dependency,
mappings: MappingDependency,
sourceNamespace: String,
destinationNamespace: String
): Dependency {
+ dependency as ModuleDependency
_registerMinecraftProvider
return project.dependencies.create(
mappedRepositoryProvider.getDependencyCoordiante(