Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import org.groovymc.modsdotgroovy.frontend.PropertyInterceptor
@CompileStatic
@Log4j2(category = 'MDG - Fabric Frontend')
class DependenciesBuilder extends DslBuilder implements PropertyInterceptor {
void mod(final String modId, def versionRange) {
core.put(modId, versionRange)
}

void mod(@DelegatesTo(value = DependencyBuilder, strategy = Closure.DELEGATE_FIRST)
@ClosureParams(value = SimpleType, options = 'org.groovymc.modsdotgroovy.frontend.fabric.DependencyBuilder')
final Closure closure) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ class FabricModsDotGroovy extends ModsDotGroovyFrontend implements PropertyInter

@Nullable String accessWidener = null

/**@
* A shorthand for a single icon file of a given size. Prefer using {@link #icon(Closure)} if you need multiple sizes.
*/
void icon(final int size, final String path) {
log.debug "icon(int, string)"
core.push('icon')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ import org.groovymc.rootpackagetransformer.RootPackage
@Log4j2(category = 'MDG - Fabric Frontend')
@RootPackage
class MixinsBuilder extends DslBuilder {
void mixin(final String config, final Environment environment = null) {
void mixin(final String config) {
log.debug "mixin(config: $config)"
core.push('mixin')
core.put('config', config)
if (environment !== null) {
core.put('environment', environment)
}
core.pop()
}

Expand Down
2 changes: 0 additions & 2 deletions test/fabric/src/main/resources/mods.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ final mdg = FabricModsDotGroovy.make {
java = ">=17"
it.'fabric-api' = "*"

mod "another-mod", ">=1.5.0"
mod("something-else", v(">0.5") & v('<1.0'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like a version range combination test like this to remain in the file still

mod {
modId = "rats"
versionRange = "*"
Expand Down