Skip to content

Commit

Permalink
A temporary(tm) fix for eclipse run UoW validation
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed May 17, 2021
1 parent 89d4027 commit 7a0676c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public void apply(final Project target) {
final org.spongepowered.gradle.vanilla.runs.RunConfigurationContainer runs = minecraft.getRuns();
final File projectDir = target.getProjectDir();
final String projectName = target.getName();
target.getTasks().register("genEclipseRuns", GenEclipseRuns.class, task -> {
target.getTasks().register(Constants.Tasks.GEN_ECLIPSE_RUNS, GenEclipseRuns.class, task -> {
task.dependsOn(assets);
task.getRunConfigurations().set(runs);
task.getProjectDirectory().set(projectDir);
task.getProjectName().set(projectName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.Nested;
import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.SourceSet;
import org.gradle.jvm.toolchain.JavaLanguageVersion;
Expand Down Expand Up @@ -114,7 +115,7 @@ public void displayName(final String displyName) {
* @return a map of launcher meta tokens
* @see ClientRunParameterTokens for known token names
*/
@Internal
@Nested
public MapProperty<String, String> getParameterTokens() {
return this.parameterTokens;
}
Expand Down Expand Up @@ -162,7 +163,7 @@ public Property<SourceSet> getIdeaRunSourceSet() {
return this.ideaSourceSet;
}

@Internal
@Nested
public List<CommandLineArgumentProvider> getAllArgumentProviders() {
return this.allArgs;
}
Expand All @@ -186,7 +187,7 @@ public List<String> allArguments() {
return values;
}

@Internal
@Nested
public List<CommandLineArgumentProvider> getAllJvmArgumentProviders() {
return this.allJvmArgs;
}
Expand Down Expand Up @@ -238,6 +239,7 @@ public void mainModule(final String mainModule) {
this.mainModule.set(mainModule);
}

@Input
public Property<JavaLanguageVersion> getTargetVersion() {
return this.targetVersion;
}
Expand All @@ -263,6 +265,12 @@ static final class ConstantListProvider implements CommandLineArgumentProvider {
this.contents = contents;
}

@Input
@Optional
public List<String> getContents() {
return this.contents;
}

@Override
public Iterable<String> asArguments() {
return this.contents == null ? Collections.emptyList() : this.contents;
Expand Down

0 comments on commit 7a0676c

Please sign in to comment.