-
-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor package structure for better maintainability and UX #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor package structure for better maintainability and UX #6
Conversation
Summary
The user can generate a new summary by commenting @diffy-bot. |
Co-authored-by: CoasterFreakDE <28011628+CoasterFreakDE@users.noreply.github.com>
Git Diff Summary
TL;DR: Consolidated package structures by renaming and moving files from _internal, functions, and utils into clearer internal and util packages, reorganized mineskin model files, and updated related imports and deprecations. You can generate a new summary by commenting @diffy-bot. |
Git Diff SummaryOverview Key Changes
TL;DR User can generate a new summary by commenting @diffy-bot. |
Co-authored-by: CoasterFreakDE <28011628+CoasterFreakDE@users.noreply.github.com>
Git Diff SummaryPatch 1/3: Initial Plan
Patch 2/3: Refactor Package Structure
Patch 3/3: Update README Documentation
TL;DR: This series of patches reorganizes the project’s package structure for cleaner modularity and updates documentation to reflect these changes. User can generate a new summary by commenting @diffy-bot. |
Diff Summary[PATCH 1/3] Initial plan
[PATCH 2/3] Refactor: Consolidate packages and improve structure
[PATCH 3/3] Update README with new package structure documentation
@diffy-bot |
Diff Summary[PATCH 1/3] Initial plan
[PATCH 2/3] Refactor: Consolidate packages and improve structure
[PATCH 3/3] Update README with new package structure documentation
@diffy-bot |
This PR refactors the KPaper library's package structure to improve maintainability, reduce complexity, and enhance developer experience. The changes consolidate similar functionality and follow Kotlin naming conventions.
Key Changes
1. Package Consolidation
functionsandutilspackages intoutil: These packages served similar purposes (utility functions) and were creating unnecessary fragmentation. All utility functions including console output, logging, random number generation, text processing, and conversation APIs are now unified under a singleutilpackage.constspackage: The namespace constants were only used in one place (InventoryExtensions.kt), so they've been moved directly there to reduce package overhead.2. Naming Convention Improvements
_internaltointernal: The underscore prefix is not standard in Kotlin packages. Updated all imports and references to use the properinternalnaming convention.3. Structure Simplification
mineskin/models/texturestructure and moved all model classes directly into themineskinpackage. This eliminates unnecessary nesting and simplifies imports throughout the codebase.4. Documentation Updates
Results
Before/After Package Structure
Before:
After:
This refactoring maintains full backward compatibility while providing a cleaner, more maintainable codebase that follows Kotlin best practices.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
nexus.modlabs.cc/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.14.2-bin/2pb3mgt1p815evrl3weanttgr/gradle-8.14.2/lib/gradle-daemon-main-8.14.2.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.14.2-bin/2pb3mgt1p815evrl3weanttgr/gradle-8.14.2/lib/agents/gradle-instrumentation-agent-8.14.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14.2(dns block)repo.papermc.io/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.14.2-bin/2pb3mgt1p815evrl3weanttgr/gradle-8.14.2/lib/gradle-daemon-main-8.14.2.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.14.2-bin/2pb3mgt1p815evrl3weanttgr/gradle-8.14.2/lib/agents/gradle-instrumentation-agent-8.14.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14.2(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.