Compare commits

..

No commits in common. "35cfc75a04aeaaffc743181923afced087f8c749" and "99e0f77fd1acfb64231cbd1f5276d9154b124b74" have entirely different histories.

22 changed files with 6 additions and 209 deletions

View file

@ -1,71 +0,0 @@
name: build-and-test
on:
- pull_request
- push
jobs:
build:
runs-on: docker
container:
image: git.staropensource.de/staropensource/actions-docker:java
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
- name: Compile
run: ./gradlew --no-daemon jar javadocJar sourceJar
- name: Upload library JARs
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: jars-libraries
path: |
**/build/libs/*.jar
!**/build/libs/*-javadoc.jar
!**/build/libs/*-sources.jar
if-no-files-found: error
- name: Upload API documentation JARs
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: jars-apidocs
path: |
**/build/libs/*-javadoc.jar
if-no-files-found: error
- name: Upload source JARs
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: jars-sources
path: |
**/build/libs/*-sources.jar
if-no-files-found: error
generate-javadoc:
runs-on: docker
container:
image: git.staropensource.de/staropensource/actions-docker:java
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
- name: Generate javadoc
run: ./gradlew --no-daemon javadoc javadocAll
- name: Upload separate javadoc
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: javadoc-separate
path: |
**/build/docs/javadoc/*
if-no-files-found: error
- name: Upload combined javadoc
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: javadoc-combined
path: |
build/docs/javadoc/*
if-no-files-found: error
test:
runs-on: docker
container:
image: git.staropensource.de/staropensource/actions-docker:java
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
- name: Run tests
run: ./gradlew --no-daemon test

View file

@ -1,24 +0,0 @@
name: build-and-test
on:
- pull_request
jobs:
generate-javadoc:
runs-on: docker
container:
image: git.staropensource.de/staropensource/actions-docker:java
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
- name: Generate javadoc
run: ./gradlew --no-daemon javadoc
test:
runs-on: docker
container:
image: git.staropensource.de/staropensource/actions-docker:java
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
- name: Run tests
run: ./gradlew --no-daemon test

View file

@ -79,7 +79,6 @@ javadoc {
setMemberLevel(JavadocMemberLevel.PUBLIC) // Only display public stuff
setOverview("src/main/javadoc/overview.html") // We want a custom overview page to greet the visitor
setLocale("en_US") //
addStringOption("Xwerror", "-quiet") // Fail build on warning
setJFlags([
"-Duser.language=en_US" // See above

View file

@ -118,7 +118,6 @@ javadoc {
setMemberLevel(JavadocMemberLevel.PUBLIC) // Only display public stuff
setOverview("src/main/javadoc/overview.html") // We want a custom overview page to greet the visitor
setLocale("en_US") //
addStringOption("Xwerror", "-quiet") // Fail build on warning
setJFlags([
"-Duser.language=en_US" // See above

View file

@ -22,6 +22,7 @@ package de.staropensource.sosengine.base.classes;
import de.staropensource.sosengine.base.Engine;
import de.staropensource.sosengine.base.annotations.EngineSubsystem;
import de.staropensource.sosengine.base.annotations.EventListener;
import de.staropensource.sosengine.base.exceptions.versioning.InvalidVersionStringException;
import de.staropensource.sosengine.base.internal.events.InternalEngineShutdownEvent;
import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.DependencyVector;
@ -70,11 +71,10 @@ public abstract class SubsystemClass {
* Used for dependency resolution during startup.
*
* @return matching {@link DependencyVector} for the subsystem
* @throws IllegalStateException when building the DependencyVector fails, see {@link DependencyVector.Builder#build()}
* @see DependencyVector
* @since v1-alpha4
* @since v1-alpha1
*/
public abstract @NotNull DependencyVector getDependencyVector() throws IllegalStateException;
public abstract @NotNull DependencyVector getDependencyVector() throws InvalidVersionStringException;
/**
* Called on engine shutdown.

View file

@ -83,13 +83,6 @@ public final class DependencySubsystemVector extends DependencyVector {
* @since v1-alpha4
*/
public static final class Builder extends DependencyVector.Builder {
/**
* Constructs this class.
*
* @since v1-alpha4
*/
public Builder() {}
/**
* Contains the {@link SubsystemClass} to associate.
*
@ -136,29 +129,5 @@ public final class DependencySubsystemVector extends DependencyVector {
if (mainClass == null)
throw new IllegalStateException("The main class is unset");
}
/**
* Returns the {@link SubsystemClass} to associate.
*
* @return {@link SubsystemClass} to associcate
* @see DependencySubsystemVector#mainClass
* @since v1-alpha4
*/
public @Nullable SubsystemClass getMainClass() {
return mainClass;
}
/**
* Sets the {@link SubsystemClass} to associate.
*
* @param mainClass new {@link SubsystemClass} to associate
* @return builder instance
* @see DependencySubsystemVector#mainClass
* @since v1-alpha4
*/
public @NotNull DependencyVector.Builder setIdentifier(@Nullable SubsystemClass mainClass) {
this.mainClass = mainClass;
return this;
}
}
}

View file

@ -31,13 +31,6 @@ import org.jetbrains.annotations.Nullable;
* @since v1-alpha4
*/
public class QuietLoggerImplementation implements LoggerImplementation {
/**
* Constructs this class.
*
* @since v1-alpha4
*/
public QuietLoggerImplementation() {}
/** {@inheritDoc} */
@Override
public @Nullable String prePlaceholder(@NotNull LogLevel level, @NotNull Class<?> issuerClass, @NotNull String issuerOrigin, @Nullable String issuerMetadata, @NotNull String message, @NotNull String format) {

View file

@ -22,5 +22,7 @@
*
* @see de.staropensource.sosengine.base.Engine
* @since v1-alpha0
* @author jeremystartm &lt;jeremystartm@staropensource.de&gt;
* @since v1-alpha0
*/
package de.staropensource.sosengine.base;

View file

@ -174,7 +174,7 @@ public class DependencyVector {
* Builds a new {@link DependencyVector} instance.
*
* @return new {@link DependencyVector}
* @throws IllegalStateException when the identifier, versioning system or version is unset or the version string is invalid
* @throws IllegalStateException if the identifier, versioning system or version is unset
* @since v1-alpha4
*/
public @NotNull DependencyVector build() throws IllegalStateException {
@ -285,7 +285,6 @@ public class DependencyVector {
* Sets the identifier of the new vector.
*
* @param identifier new identifier
* @return builder instance
* @see DependencyVector#identifier
* @since v1-alpha4
*/
@ -298,7 +297,6 @@ public class DependencyVector {
* Sets the versioning system the new vector should use.
*
* @param versioningSystem versioning system to use
* @return builder instance
* @see DependencyVector#versioningSystem
* @since v1-alpha4
*/
@ -311,7 +309,6 @@ public class DependencyVector {
* Sets the version of the new vector.
*
* @param version vector version
* @return builder instance
* @see DependencyVector#version
* @since v1-alpha4
*/
@ -324,7 +321,6 @@ public class DependencyVector {
* Sets a set of all identifiers and their versions the new vector should depend on.
*
* @param dependencies dependencies
* @return builder instance
* @see DependencyVector#dependencies
* @since v1-alpha4
*/
@ -337,7 +333,6 @@ public class DependencyVector {
* Sets a set of all identifiers and their versions the new vector should provide.
*
* @param provides provided vectors
* @return builder instance
* @see DependencyVector#provides
* @since v1-alpha4
*/

View file

@ -56,7 +56,6 @@ tasks.register("javadocAll", Javadoc) {
setMemberLevel(JavadocMemberLevel.PUBLIC) // Only display public stuff
setOverview("src/main/javadoc/overview.html") // We want a custom overview page to greet the visitor
setLocale("en_US") //
addStringOption("Xwerror", "-quiet") // Fail build on warning
setJFlags([
"-Duser.language=en_US" // See above

View file

@ -77,7 +77,6 @@ javadoc {
setMemberLevel(JavadocMemberLevel.PUBLIC) // Only display public stuff
setOverview("src/main/javadoc/overview.html") // We want a custom overview page to greet the visitor
setLocale("en_US") //
addStringOption("Xwerror", "-quiet") // Fail build on warning
setJFlags([
"-Duser.language=en_US" // See above

View file

@ -112,7 +112,6 @@ javadoc {
setMemberLevel(JavadocMemberLevel.PUBLIC) // Only display public stuff
setOverview("src/main/javadoc/overview.html") // We want a custom overview page to greet the visitor
setLocale("en_US") //
addStringOption("Xwerror", "-quiet") // Fail build on warning
setJFlags([
"-Duser.language=en_US" // See above

View file

@ -116,7 +116,6 @@ javadoc {
setMemberLevel(JavadocMemberLevel.PUBLIC) // Only display public stuff
setOverview("src/main/javadoc/overview.html") // We want a custom overview page to greet the visitor
setLocale("en_US") //
addStringOption("Xwerror", "-quiet") // Fail build on warning
setJFlags([
"-Duser.language=en_US" // See above

View file

@ -113,7 +113,6 @@ javadoc {
setMemberLevel(JavadocMemberLevel.PUBLIC) // Only display public stuff
setOverview("src/main/javadoc/overview.html") // We want a custom overview page to greet the visitor
setLocale("en_US") //
addStringOption("Xwerror", "-quiet") // Fail build on warning
setJFlags([
"-Duser.language=en_US" // See above

View file

@ -71,7 +71,6 @@ javadoc {
setMemberLevel(JavadocMemberLevel.PUBLIC) // Only display public stuff
setOverview("src/main/javadoc/overview.html") // We want a custom overview page to greet the visitor
setLocale("en_US") //
addStringOption("Xwerror", "-quiet") // Fail build on warning
setJFlags([
"-Duser.language=en_US" // See above

View file

@ -21,12 +21,9 @@ package de.staropensource.sosengine.testapp;
import de.staropensource.sosengine.base.Engine;
import de.staropensource.sosengine.base.annotations.EventListener;
import de.staropensource.sosengine.base.data.versioning.OneNumberVersioningSystem;
import de.staropensource.sosengine.base.events.ThrowableCatchEvent;
import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.DependencyVector;
import de.staropensource.sosengine.base.types.vectors.Vec2i;
import de.staropensource.sosengine.base.utility.DependencyResolver;
import de.staropensource.sosengine.base.utility.Miscellaneous;
import de.staropensource.sosengine.base.utility.parser.StackTraceParser;
import de.staropensource.sosengine.graphics.GraphicsSubsystem;
@ -41,9 +38,7 @@ import lombok.SneakyThrows;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Set;
/**
* The main class of the sos!engine development application.
@ -129,60 +124,6 @@ public final class Main {
// Say hello to the world!
logger.info("Hello world!");
// DependencyResolver test
DependencyResolver resolver = new DependencyResolver();
Set<@NotNull String> depsT1 = new HashSet<>();
Set<@NotNull String> provT1 = new HashSet<>();
Set<@NotNull String> depsT2 = new HashSet<>();
Set<@NotNull String> provT2 = new HashSet<>();
Set<@NotNull String> depsT3 = new HashSet<>();
Set<@NotNull String> provT3 = new HashSet<>();
Set<@NotNull String> depsT4 = new HashSet<>();
Set<@NotNull String> provT4 = new HashSet<>();
depsT2.add("test1=5");
provT3.add("test5=11");
depsT4.add("test3>100<10");
resolver.addVectors(new DependencyVector[]{
new DependencyVector.Builder()
.setIdentifier("test1")
.setVersioningSystem(OneNumberVersioningSystem.class)
.setVersion("5")
.setDependencies(depsT1)
.setProvides(provT1)
.build(),
new DependencyVector.Builder()
.setIdentifier("test2")
.setVersioningSystem(OneNumberVersioningSystem.class)
.setVersion("1")
.setDependencies(depsT2)
.setProvides(provT2)
.build(),
new DependencyVector.Builder()
.setIdentifier("test3")
.setVersioningSystem(OneNumberVersioningSystem.class)
.setVersion("106")
.setDependencies(depsT3)
.setProvides(provT3)
.build(),
new DependencyVector.Builder()
.setIdentifier("test4")
.setVersioningSystem(OneNumberVersioningSystem.class)
.setVersion("69")
.setDependencies(depsT4)
.setProvides(provT4)
.build()
});
try {
resolver.resolve();
} catch (Exception exception) {
logger.crash("Test resolution failed", exception);
}
logger.warn("Test resolution succeeded");
// Choose Graphics API to use
if (!GraphicsSubsystem.getInstance().setGraphicsApi())
logger.crash("No Graphics API is compatible");