Commit 3068bb4
authored
V2 (#3)
* fix: Start reworking system
* feat: add build data model, validation, and initial SQL storage layer
* feat(sql): add Gradle build config, improve test setup, and add tinylog config
- Add build.gradle.kts with dependencies for Exposed, SQLite, HikariCP, and Tinylog, enabling JVM toolchain 24 and JUnit support
- Add tinylog.properties for console logging configuration
- Update QueriesTest to use HikariCP for in-memory SQLite database setup, improving test reliability and resource management
- Clean up unused imports in Queries.kt
- Update settings.gradle.kts to include the "sql" module only once
* feat(postgres): add JOOQ-based build metadata storage, Flyway migration, and test setup
- Add Queries utility for managing build metadata and versions using JOOQ in Postgres
- Implement saveBuild, getBuild, and getLatestSupporting methods for build versioning and format support
- Add QueriesTest for integration testing with HikariCP and JUnit
- Add Flyway migration script (V1__Create_build_tables.sql) and test.sql for schema setup and manual testing
- Update Build record to use LocalDateTime for creationTimestamp
- Add Gradle build config for Postgres module with JOOQ and Flyway plugins, dependencies, and codegen setup
- Add tinylog.properties for logging configuration
- Update .gitignore for generated JOOQ sources
- Update settings.gradle.kts to include postgres module
- Comment out unused test code in BuildConstructorTest
* feat(sqlite): add SQLite build metadata storage with Flyway migration, JOOQ codegen, and test setup
- Add Gradle build and dependency configuration for SQLite, Flyway, JOOQ, and test libraries
- Introduce Flyway migration (V1__Create_build_tables.sql) for build_meta, build_version, and build_supported_formats tables with indexes and constraints
- Generate JOOQ classes for SQLite schema: tables, records, keys, indexes, and schema objects
- Implement BuildDatabaseManager for saving and retrieving build metadata and versions, including supported formats and versioning logic
- Add comprehensive unit tests for BuildDatabaseManager covering save, update, and query scenarios
- Update Build.java to include checksum field in the data model
- Add tinylog.properties for debug logging configuration
- Update settings.gradle.kts to include new sqlite and plugin modules
* feat(plugin): add Paper plugin setup with region selection tool and fake entity displays
- Add initial Paper plugin implementation with BuildFormatPlugin entrypoint and RegionSelectionTool for region selection using blaze rod
- Implement FakeEntity and FakeItemDisplay classes for handling client-side entity displays, including transformation, glowing, and item rendering
- Add Extensions utility for conversions between Bukkit and Minecraft internals, packet sending, and serialization
- Configure Gradle build for Paper plugin development: add paperweight, run-paper, and resource-factory plugins, set Java 23 toolchain, update Gradle wrapper to 9.1.0, and add plugin YAML generation
- Update gradlew and gradlew.bat scripts for improved error handling and SPDX compliance
- Add plugin metadata and dependency repositories in settings.gradle.kts
- Enable region selection visualization with dynamically scaled and transformed fake item displays, including outline rendering and cleanup on player disconnect
* refactor(requirement): unify attribute and position requirements, update BuildFormat and add Cuboid type
- Rename AttributeRequirement to Requirement and generalize to support any requirement with a data type and attribute name.
- Update BuildFormat to use a single requirements list instead of separate position and attribute requirements, simplifying validation logic.
- Adjust BuildFormat validation to check only for attribute presence in generic settings.
- Add Cuboid record to types for representing 3D regions with normalized min/max positions.
- Extend Position with a new constructor for (double x, double y, double z) for convenience.
* feat(requirement): add interactive requirement collection system with session management and region selection
- Introduce RequirementCollector abstract class for handling asynchronous player input for requirements
- Add PositionRequirementCollector and RegionRequirementCollector implementations for position and cuboid data types
- Implement SessionManager to manage per-player input sessions and orchestrate requirement collection based on BuildFormat
- Add ClickableManager to enable custom item click actions for interactive UI in the player's inventory
- Extend RegionSelectionTool with static selection storage and Cuboid conversion, and expose getSelection for use in collectors
- Register BuildCommand using LiteCommands for initiating build sessions
- Register ClickableManager as a Bukkit event listener in BuildFormatPlugin
- Add litecommands-bukkit dependency to build.gradle.kts
* fix(plugin): prevent duplicate viewer removal in FakeItemDisplay
* feat(region): enhance region selection tool with custom model data, lore, and drop-to-clear functionality
- Add custom model data and detailed lore to RegionSelectionTool for improved user guidance
- Implement drop event to allow players to clear region selection by dropping the tool
- Refactor selection logic to use tool identity checks instead of material type
- Update region outline rendering for more accurate scaling and transformation
- Simplify ClickableManager API by removing unnecessary player parameter
- Improve feedback messages for position selection actions
* feat(requirement): introduce extensible requirement system with factories, annotations, and serialization
- Add Requirement interface and specialized types (ListRequirement, NumberRequirement, SimpleRequirement) for flexible requirement modeling
- Implement annotation classes (Min, Max, Range) for declarative requirement constraints
- Create RequirementFactory interface and concrete factories for list, number, and simple requirements, supporting dynamic creation and serialization/deserialization
- Add BuildFormatManager to manage requirement factories, generate requirements from record components, and handle serialization/deserialization
- Refactor SessionManager to use new requirement system and collector factories, supporting dynamic collector instantiation per requirement
- Update RegionRequirementCollector and PositionRequirementCollector to accept name and step number for improved session context
- Add RequirementCollectorFactory interface for collector instantiation
- Update BuildCommand to use new requirement system for session creation
- Replace jspecify annotations with jetbrains annotations for consistency
- Update build.gradle.kts dependencies to reflect annotation library changes and improve test setup
- Refactor RegionSelectionTool and BuildDatabaseManager to use jetbrains annotations and improve null safety
- Update BuildConstructorTest to demonstrate requirement generation and serialization
* feat(requirement): add position selection tool and refactor region selection system
- Introduced PositionTool for interactive position selection with visual feedback using FakeItemDisplay.
- Refactored RegionSelectionTool to support multiple region selections per player via unique tool identifiers, improving selection management and display updates.
- Updated RegionRequirementCollector and PositionRequirementCollector to use new tools and provide clearer user messaging via Lang utility.
- Added Lang class for standardized, formatted messages for region and position selection steps.
- Adjusted BuildCommand and SessionManager to integrate new requirement collectors and tools.
- Updated build.gradle.kts to include adventure-text-minimessage for rich text formatting.
- Moved and renamed requirement collector classes to collectors package for better organization.
* feat(requirement): improve tool system, add display feedback, and enhance collector flow
- Refactor PositionTool and RegionSelectionTool to use new Tool record for tool management
- Add FakeTextDisplay entity for in-world text feedback, integrate with position selection
- Update PositionTool to show player head and text display at selected position, with glowing effect and orientation
- Implement tool cleanup methods to remove displays and clear state after collection
- Enhance PositionRequirementCollector and RegionRequirementCollector to provide better user guidance and feedback, including inventory setup and completion actions
- Update SessionManager to handle sequential requirement collection, cleanup, and result reporting
- Add Range and Regex annotation types for future extensibility
- Improve Lang utility with position query messaging
- Various code style improvements, nullability annotations, and method renaming for clarity
* feat(requirement): introduce typed requirement system with factories and collectors
Refactor requirement architecture to use distinct types for position, number, string, and cuboid requirements. Add dedicated factory classes for Integer, Double, Long, Position, String, and Cuboid requirements, replacing generic implementations. Update BuildFormatManager to register new factories and map types accordingly.
Implement new collector interfaces and classes for position, region, multi-position, and text input requirements, supporting blocking input and improved session management. Refactor SessionManager to use requirement type-based collector factories and support text input via chat events.
Update ListRequirement and ListRequirementFactory to support serialization/deserialization of inner requirement types. Remove unused getType methods from requirements and simplify NumberRequirement to an abstract class.
Enhance BuildCommand to demonstrate new requirement types in input sessions. Add Lang utility for text input prompts. Update build dependencies for plain text serializer support.
Overall, this change improves extensibility, type safety, and user interaction for requirement collection and serialization.
* feat(build): add build data collection and schematic conversion flow
- Introduce BuildData record to encapsulate schematic and polar data.
- Add SchemPolarConverter for converting Sponge schematics to Polar format using Minestom and HollowCube libraries.
- Update SessionManager to orchestrate build region selection, requirement collection, schematic generation, and upload prompt.
- Refactor requirement collectors: rename RegionRequirementCollector to CuboidRequirementCollector and add BuildRequirementCollector for initial build region selection.
- Enhance BuildCommand with error handling and feedback for session creation.
- Expose getSerializers in BuildFormatManager and fix ListRequirementFactory to use serializers for deserialization.
- Update build.gradle.kts: add dependencies for FAWE, Minestom, HollowCube Schem/Polar, and set Java 25 toolchain.
- Minor formatting improvements in BuildFormatPlugin.
* feat(store): introduce BuildDataStore and BuildMetaStore interfaces for build data and metadata management
- Add BuildDataStore interface to handle saving, deleting, and retrieving build data by name and version.
- Add BuildMetaStore interface to manage build metadata, including saving builds, retrieving by name/version, and listing builds by format.
- Rename BuildConstructorTest to BuildMetaConstructorTest to reflect focus on build metadata construction.
- These changes establish foundational storage abstractions for build and metadata operations, improving modularity and future extensibility.
* feat(store): introduce BuildDataStore and BuildMetaStore interfaces for build data and metadata management
- Add BuildDataStore interface to handle saving, deleting, and retrieving build data by name and version.
- Add BuildMetaStore interface to manage build metadata, including saving builds, retrieving by name/version, and listing builds by format.
- Rename BuildConstructorTest to BuildMetaConstructorTest to reflect focus on build metadata construction.
- These changes establish foundational storage abstractions for build and metadata operations, improving modularity and future extensibility.
* refactor(store): remove build version description, migrate BuildDatabaseManager to SQLBuildMetaStore, and update schema and tests
- Removed the 'description' field from BuildVersionRecord, BuildVersion, and the build_version table schema.
- Renamed BuildDatabaseManager to SQLBuildMetaStore and refactored to implement BuildMetaStore interface.
- Updated method signatures to remove description and change supported formats to a single format string.
- Improved transaction handling and result mapping for build metadata and version queries.
- Added getBuild(name, version) and getBuildsByFormat(format) methods for more flexible querying.
- Updated SQLBuildBuildMetaStoreTest to reflect API changes, including assertions for new method behaviors.
- Added s3 module to settings.gradle.kts.
- Updated .gitignore for plugin run directory.
* refactor(build): remove delete method from BuildDataStore and update BuildManager to declare exceptions
- BuildDataStore: deleted the delete method to simplify the interface and focus on essential operations.
- BuildManager: updated saveBuild and loadBuild methods to declare thrown exceptions, improving error handling and consistency with underlying store interfaces.
* feat(s3): implement S3BuildDataStore get method and add integration test
- Add get method to S3BuildDataStore for retrieving build data from S3, including byte download logic and temporary file management.
- Refactor key formatting for polar and schematic data to use constants.
- Introduce downloadBytesFromS3 helper for file retrieval and cleanup.
- Add S3BuildDataStoreTest using LocalStack to verify save and get operations with S3.
- Create build.gradle.kts with dependencies for AWS SDK, JUnit, and Testcontainers to support S3 integration testing.
* ci(build): add GitHub Actions workflow for automated build and release
Introduce build.yaml workflow to automate building, publishing, and releasing artifacts on tag push or manual dispatch. Sets up JDK 23, builds with Gradle, publishes to UTF Maven repository, uploads JAR artifacts, and creates GitHub releases with customizable release names. Enhances CI/CD by streamlining release management and artifact distribution.
* feat(s3): add automatic bucket creation to S3BuildDataStore and improve integration test
- S3BuildDataStore now checks for bucket existence and creates it if missing, handling relevant exceptions and logging outcomes.
- Enhanced S3BuildDataStoreTest to verify data integrity after retrieval, asserting that saved and downloaded data match.
- Removed redundant group and version declarations from build.gradle.kts for cleaner configuration.
* feat(store): add PostgresBuildMetaStore integration test, update SQLBuildMetaStore constructors, and improve migration scripts
- Added PostgresBuildMetaStoreTest for integration testing with PostgreSQL using Testcontainers and Flyway migrations.
- Enhanced SQLBuildMetaStore with constructors supporting DataSource and Connection for improved flexibility.
- Refined Flyway migration scripts for both SQLite and PostgreSQL, ensuring proper schema creation and unique indexes.
- Renamed SQLBuildBuildMetaStoreTest to SQLiteBuildMetaStoreTest and updated migration path for SQLite tests.
- Updated build.gradle.kts to use java-library plugin, add PostgreSQL test dependencies, and adjust Flyway/jOOQ configuration for multi-database support.
* feat(build): implement dynamic build format system, async region selection, and improved session management
- Add FormatRegistry for loading build formats from files and deserializing requirements
- Refactor BuildCommand to support dynamic format selection and session initiation
- Introduce BuildNameCollector for interactive build naming via chat
- Replace BuildRequirementCollector with BuildCuboidCollector for region selection, using async inventory updates
- Update PositionRequirementCollector, CuboidRequirementCollector, and MultiPositionRequirementCollector to use TaskUtils for thread-safe inventory changes
- Add TaskUtils utility for running tasks synchronously on the main thread
- Refactor SessionManager to support format-based sessions, async build uploads, and improved requirement collection
- Update RegionSelectionTool to provide tools without direct inventory modification
- Enhance ClickableManager to cancel events on valid click actions
- Add config.yml for database and AWS configuration
- Update BuildFormatPlugin to load config, initialize S3 and SQL stores, and register new collectors and listeners
- Update build.gradle.kts to include new dependencies for SQL and S3 modules, and PostgreSQL driver
* feat(requirement): refactor requirement types to records, add factory registration by TypeReference, and implement utility classes
- Refactor CuboidRequirement, PositionRequirement, StringRequirement, and PositionListRequirement to use Java records for simplified data handling.
- Update Requirement interface to use `name()` method instead of `getName()`.
- Overhaul BuildFormatManager to register requirement factories using TypeReference, enabling support for parameterized types and improved type matching.
- Add RegisteredRequirement record to encapsulate TypeReference and RequirementFactory pairs.
- Implement ClassUtils for parameterized type comparison and primitive-to-wrapper conversion.
- Add BuildFormatExporter utility for exporting requirements to file.
- Introduce PositionListRequirementFactory and StringRequirementFactory for new requirement types.
- Add Test class for requirement generation testing.
- Update build.gradle.kts to remove group and version declarations.
- Improve requirement serialization/deserialization logic and factory lookup for better extensibility and correctness.
* remove old sqlite files
* chore(project): update subproject structure, add Maven publishing, and introduce dev docker-compose
- Rename 'sqlite' subproject to 'sql' in settings.gradle.kts for clarity and consistency
- Add docker-compose.yaml with MinIO and Postgres services for local development and testing
- Update .gitignore to exclude generated jooq sources in sql module
- Enable Maven publishing for all subprojects except 'plugin', configuring repository and credentials in build.gradle.kts
* fix: Remove Test file1 parent 07aacbe commit 3068bb4
File tree
118 files changed
+3642
-2510
lines changed- .github/workflows
- cli/src/main/java/org/readutf/buildformat/cli
- common
- src
- main/java/org/readutf/buildformat
- common
- exception
- format
- requirements
- markers
- meta
- impl
- schematic
- requirement
- annotations
- factory
- impl
- types
- list
- number
- store
- types
- utils
- test/java/org/readutf/buildformat
- builder
- common/format
- gradle/wrapper
- plugin
- run/plugins
- src/main
- java/org/readutf/buildformat
- commands
- converter
- fakes
- format
- plugin
- commands
- types
- formats
- impl
- marker
- requirement
- collectors
- cuboid
- position
- text
- tools
- utils
- resources
- s3
- src
- main/java/org/readutf/buildformat/s3
- test
- java/org/readutf/buildformat/s3
- resources
- sql
- src
- main
- java/org/readutf/buildformat
- postgres
- sql
- kotlin/org/readutf/buildformat/sql
- resources/db/migration
- postgres
- sqlite
- test
- java/org/readutf/buildformat/postgres
- kotlin/org/readutf/buildformat/sql
- resources
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
118 files changed
+3642
-2510
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
This file was deleted.
0 commit comments