Skip to content

Commit

Permalink
Trivia fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Feb 23, 2020
1 parent ec8659b commit 8ec64a0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

public @ValueType class Project {

public static Project EMPTY = new Project("", "", List.of(), "", "", "");
public static Project EMPTY = new Project("", "", "", List.of(), "", "");
public static Map<String, String> DEPENDENCIES = Map.of(
"bukkit", "org.bukkit",
"craftbukkit", "org.bukkit",
Expand All @@ -43,17 +43,17 @@

public final String name;
public final String version;
public final @Immutable List<String> authors;
public final String api;
public final @Immutable List<String> authors;
public final String description;
public final String url;


public Project(String name, String version, List<String> authors, String api, String description, String url) {
public Project(String name, String version, String api, List<String> authors, String description, String url) {
this.name = name;
this.version = version;
this.authors = authors;
this.api = api;
this.authors = authors;
this.description = description;
this.url = url;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void resolve() {

@Test
void resolve_inferred() {
resolver.initialize(new Project("", "", List.of(), "1.15.1", "", ""), Extractor.CLASS, resolution);
resolver.initialize(new Project("", "", "1.15.1", List.of(), "", ""), Extractor.CLASS, resolution);

resolver.resolve(Inferred.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void resolve_information() {

@Test
void resolve_information_project() {
resolver.initialize(new Project("", "", List.of("Pante"), "", "project description", "http://wwww.repo.karuslabs.com"), Extractor.CLASS, resolution);
resolver.initialize(new Project("", "", "", List.of("Pante"), "project description", "http://wwww.repo.karuslabs.com"), Extractor.CLASS, resolution);

resolver.resolve(Empty.class.getAnnotation(Information.class));
var mappings = resolution.mappings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PluginResolverTest {

StubResolver resolver = new StubResolver();
Resolution<Class<?>> resolution = new Resolution<>();
Project project = new Project("project_name", "1.0.0", List.of(), "", "", "");
Project project = new Project("project_name", "1.0.0", "", List.of(), "", "");


@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ protected Project project() {
.map(Contributor::getName)
.collect(toList());

var version = "";
var api = "";
for (var dependency : pom.getDependencies()) {
var group = Project.DEPENDENCIES.get(dependency.getArtifactId());
if (Objects.equals(group, dependency.getGroupId())) {
version = dependency.getVersion();
api = dependency.getVersion();
break;
}
}
return new Project(pom.getName(), pom.getVersion(), authors, version, pom.getDescription(), pom.getUrl());
return new Project(pom.getName(), pom.getVersion(), api, authors, pom.getDescription(), pom.getUrl());
}

protected List<Message<Class<?>>> log(List<Message<Class<?>>> messages) {
Expand Down

0 comments on commit 8ec64a0

Please sign in to comment.