diff options
| author | Kostya <mail@sartin.in> | 2026-08-09 14:46:25 +0300 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-08-09 14:46:25 +0300 |
| commit | 34deee1c5ef2df5ba2514f77ec4dfd4a684a9d13 (patch) | |
| tree | 17d9c867856ff9f1de4a59f63c13d6abf0ecb31e /api | |
| parent | 18a9b6e4f3c9f7e034a0c174a5e2cd6c043ee169 (diff) | |
| download | guess-market-34deee1c5ef2df5ba2514f77ec4dfd4a684a9d13.tar.gz guess-market-34deee1c5ef2df5ba2514f77ec4dfd4a684a9d13.tar.xz guess-market-34deee1c5ef2df5ba2514f77ec4dfd4a684a9d13.zip | |
flatten modules to repo root, vendor deps, repair Eclipse build paths
Move api, engine, ui-console and ui-desktop out of modules/ up to the
repo root and drop the empty exception project (GuessMarketException now
lives in api).
Vendor gson, jaxb, okhttp, openjfx and tomcat under lib/, and group the
JUnit standalone jar into lib/junit/ alongside them.
Rewrite every .classpath: drop the copy-pasted optional="true" that was
masking real build path errors, point the library entries at ../lib/,
and put the JUnit jar on the test source folders so the placeholder
AppTest classes compile.
ui-desktop: take the JavaFX jars off the modulepath (there is no
module-info.java, so module="true" left the packages unresolvable) and
add a Launcher that calls Application.launch, avoiding the "JavaFX
runtime components are missing" check without VM arguments.
engine: add LocalGuessMarketService and the GuessMarketContext provider
interface, and give GuessMarketException the no-arg and cause
constructors they need.
Diffstat (limited to 'api')
| -rw-r--r-- | api/.classpath | 14 | ||||
| -rw-r--r-- | api/.project | 28 | ||||
| -rw-r--r-- | api/src/main/java/market/guess/api/Commission.java | 3 | ||||
| -rw-r--r-- | api/src/main/java/market/guess/api/CommissionChargeType.java | 6 | ||||
| -rw-r--r-- | api/src/main/java/market/guess/api/EventDTO.java | 1 | ||||
| -rw-r--r-- | api/src/main/java/market/guess/api/EventStatus.java | 7 | ||||
| -rw-r--r-- | api/src/main/java/market/guess/api/LoadResultDTO.java | 3 | ||||
| -rw-r--r-- | api/src/main/java/market/guess/exception/GuessMarketException.java | 13 | ||||
| -rw-r--r-- | api/src/test/java/market/guess/api/AppTest.java | 12 |
9 files changed, 87 insertions, 0 deletions
diff --git a/api/.classpath b/api/.classpath new file mode 100644 index 0000000..0e305bc --- /dev/null +++ b/api/.classpath | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <classpath> | ||
| 3 | <!-- Defines your source folder --> | ||
| 4 | <classpathentry kind="src" output="bin/classes" path="src/main/java"/> | ||
| 5 | <classpathentry kind="src" output="bin/test-classes" path="src/test/java"> | ||
| 6 | <attributes> | ||
| 7 | <attribute name="test" value="true"/> | ||
| 8 | </attributes> | ||
| 9 | </classpathentry> | ||
| 10 | <classpathentry kind="lib" path="../lib/junit/junit-platform-console-standalone-6.1.1.jar"/> | ||
| 11 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
| 12 | <classpathentry kind="output" path="bin"/> | ||
| 13 | </classpath> | ||
| 14 | |||
diff --git a/api/.project b/api/.project new file mode 100644 index 0000000..0dc50c5 --- /dev/null +++ b/api/.project | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <projectDescription> | ||
| 3 | <name>guess-market-api</name> | ||
| 4 | <comment></comment> | ||
| 5 | <projects> | ||
| 6 | </projects> | ||
| 7 | <buildSpec> | ||
| 8 | <buildCommand> | ||
| 9 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
| 10 | <arguments> | ||
| 11 | </arguments> | ||
| 12 | </buildCommand> | ||
| 13 | </buildSpec> | ||
| 14 | <natures> | ||
| 15 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
| 16 | </natures> | ||
| 17 | <filteredResources> | ||
| 18 | <filter> | ||
| 19 | <id>1786044291084</id> | ||
| 20 | <name></name> | ||
| 21 | <type>30</type> | ||
| 22 | <matcher> | ||
| 23 | <id>org.eclipse.core.resources.regexFilterMatcher</id> | ||
| 24 | <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
| 25 | </matcher> | ||
| 26 | </filter> | ||
| 27 | </filteredResources> | ||
| 28 | </projectDescription> | ||
diff --git a/api/src/main/java/market/guess/api/Commission.java b/api/src/main/java/market/guess/api/Commission.java new file mode 100644 index 0000000..96cab8a --- /dev/null +++ b/api/src/main/java/market/guess/api/Commission.java | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | package market.guess.api; | ||
| 2 | |||
| 3 | public record Commission(CommissionChargeType type, int percentage) {} | ||
diff --git a/api/src/main/java/market/guess/api/CommissionChargeType.java b/api/src/main/java/market/guess/api/CommissionChargeType.java new file mode 100644 index 0000000..75e409b --- /dev/null +++ b/api/src/main/java/market/guess/api/CommissionChargeType.java | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | package market.guess.api; | ||
| 2 | |||
| 3 | public enum CommissionChargeType { | ||
| 4 | ON_CLOSE, | ||
| 5 | ON_PURCHASE | ||
| 6 | } | ||
diff --git a/api/src/main/java/market/guess/api/EventDTO.java b/api/src/main/java/market/guess/api/EventDTO.java new file mode 100644 index 0000000..66b2312 --- /dev/null +++ b/api/src/main/java/market/guess/api/EventDTO.java | |||
| @@ -0,0 +1 @@ | |||
| package market.guess.api; | |||
diff --git a/api/src/main/java/market/guess/api/EventStatus.java b/api/src/main/java/market/guess/api/EventStatus.java new file mode 100644 index 0000000..acd7542 --- /dev/null +++ b/api/src/main/java/market/guess/api/EventStatus.java | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | package market.guess.api; | ||
| 2 | |||
| 3 | public enum EventStatus { | ||
| 4 | NOT_STARTED, | ||
| 5 | ACTIVE, | ||
| 6 | CLOSED | ||
| 7 | } | ||
diff --git a/api/src/main/java/market/guess/api/LoadResultDTO.java b/api/src/main/java/market/guess/api/LoadResultDTO.java new file mode 100644 index 0000000..cf3630b --- /dev/null +++ b/api/src/main/java/market/guess/api/LoadResultDTO.java | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | package market.guess.api; | ||
| 2 | |||
| 3 | public record LoadResultDTO() {} | ||
diff --git a/api/src/main/java/market/guess/exception/GuessMarketException.java b/api/src/main/java/market/guess/exception/GuessMarketException.java new file mode 100644 index 0000000..e2e486c --- /dev/null +++ b/api/src/main/java/market/guess/exception/GuessMarketException.java | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | package market.guess.exception; | ||
| 2 | |||
| 3 | public class GuessMarketException extends Exception { | ||
| 4 | public GuessMarketException() {} | ||
| 5 | |||
| 6 | public GuessMarketException(String message) { | ||
| 7 | super(message); | ||
| 8 | } | ||
| 9 | |||
| 10 | public GuessMarketException(String message, Throwable cause) { | ||
| 11 | super(message, cause); | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/api/src/test/java/market/guess/api/AppTest.java b/api/src/test/java/market/guess/api/AppTest.java new file mode 100644 index 0000000..b5883d6 --- /dev/null +++ b/api/src/test/java/market/guess/api/AppTest.java | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | package market.guess.api; | ||
| 2 | |||
| 3 | import static org.junit.jupiter.api.Assertions.assertTrue; | ||
| 4 | |||
| 5 | import org.junit.jupiter.api.Test; | ||
| 6 | |||
| 7 | public class AppTest { | ||
| 8 | @Test | ||
| 9 | void deterministicTest() { | ||
| 10 | assertTrue(true); | ||
| 11 | } | ||
| 12 | } | ||