Skip to content

Commit

Permalink
allow passing multiple arguments to dependency DSL calls (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
JT122406 authored Dec 3, 2023
1 parent cc8a42a commit db76ec2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'com.gradle.plugin-publish' version '1.2.0'
}

version = '2.8.6'
version = '2.8.7'
group = 'com.modrinth.minotaur'
archivesBaseName = 'Minotaur'
description = 'Modrinth plugin for publishing builds to the website!'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,23 @@ protected NamedDependencyContainer(NamedDomainObjectContainer<NamedDependency> c
/**
* Creates an incompatible Dependency Container and applies the projectId property
*
* @param projectId the project id
* @param projectIds the project id(s)
*/
public void project(final String projectId) {
this.dependencyContainer.add(new NamedDependency(projectId, null, this.dependencyType));
public void project(final String... projectIds) {
for (String projectId : projectIds) {
this.dependencyContainer.add(new NamedDependency(projectId, null, this.dependencyType));
}
}

/**
* Creates a incompatible Dependency Container and applies the versionId property
*
* @param versionId the version id
* @param versionIds the version id(s)
*/
public void version(final String versionId) {
this.dependencyContainer.add(new NamedDependency(null, versionId, this.dependencyType));
public void version(final String... versionIds) {
for (String versionId : versionIds) {
this.dependencyContainer.add(new NamedDependency(null, versionId, this.dependencyType));
}
}

/**
Expand Down

0 comments on commit db76ec2

Please sign in to comment.