Skip to content

Commit

Permalink
more back-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Aug 4, 2024
1 parent a252ad2 commit ab7a81a
Show file tree
Hide file tree
Showing 3 changed files with 514 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package xyz.wagyourtail.unimined.api.mapping

import MemoryMapping
import groovy.lang.Closure
import groovy.lang.DelegatesTo
import kotlinx.coroutines.runBlocking
Expand Down Expand Up @@ -36,7 +37,7 @@ abstract class MappingsConfig<T: MappingResolver<T>>(val project: Project, val m
runBlocking {
resolve()
}
namespaces.entries.firstOrNull { it.value }?.key ?: error("No \"Named\" namespace found for devNamespace")
namespaces.entries.firstOrNull { it.value }?.key ?: error("No \"Named\" namespace found for devNamespace, if this is correct, set devNamespace explicitly")
})

fun devNamespace(namespace: String) {
Expand Down Expand Up @@ -469,6 +470,9 @@ abstract class MappingsConfig<T: MappingResolver<T>>(val project: Project, val m

abstract fun hasStubs(): Boolean

@Deprecated("Use stubs instead", ReplaceWith("stubs(*namespaces, apply = apply)"))
abstract val stub: MemoryMapping

abstract fun stubs(vararg namespaces: String, apply: MappingDSL.() -> Unit)

fun stubs(
Expand Down
Loading

0 comments on commit ab7a81a

Please sign in to comment.