Skip to content
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

Version checker #16

Merged
merged 10 commits into from
Oct 2, 2024
Merged

Version checker #16

merged 10 commits into from
Oct 2, 2024

Conversation

NonSwag
Copy link
Member

@NonSwag NonSwag commented Oct 2, 2024

Introduced version checker

Introduced `VersionChecker` class to manage version checks for the Arkitektonika project using GitHub releases. The new implementation logs whether the running version is the latest, needs an update, or is a snapshot.
Introduced VersionChecker to validate application version at startup. This ensures compatibility and helps in maintaining up-to-date software standards.
Added the 'net.thenextlvl.core:version-checker:1.2.0' dependency to ensure the application can perform version checks. Also, enabled the 'minimize' option in the shadowJar task to reduce jar size by removing unused classes.
This new file includes annotations to enforce non-null default behavior for types, fields, methods, and parameters. It improves code robustness by ensuring that null values are not implicitly allowed.
@NonSwag NonSwag added the enhancement New feature or request label Oct 2, 2024
@NonSwag NonSwag self-assigned this Oct 2, 2024
@NonSwag NonSwag linked an issue Oct 2, 2024 that may be closed by this pull request
The minimize function was removed from the shadowJar task configuration in the build.gradle.kts file. This change is intended to ensure that all dependencies are included in the final jar file.
Upgraded version-checker to 1.2.1 for better compatibility and bug fixes. Changed manifest attribute from 'Version' to 'Implementation-Version' to comply with standard conventions.
Updated the owner string in the VersionChecker constructor from "TheNextLvl" to "TheNextLvl-net" to correct a bug in ownership identification.
Updated the `versionRunning` initialization in `VersionChecker` to use `Objects.requireNonNullElse`. This ensures that if the implementation version is null, it defaults to "0.0.0". This change prevents potential null pointer exceptions.
Modified the VersionChecker to handle version strings that start with 'v'. This ensures compatibility with different versioning formats and avoids potential errors during version parsing.
Implemented a check to identify if the running version is "0.0.0," which is designated as a development version. An informational log message is added to confirm the usage of the development version. This enhances clarity during development by informing the user explicitly when a development version is being run.
@NonSwag NonSwag merged commit 4096bbf into master Oct 2, 2024
3 checks passed
@NonSwag NonSwag deleted the version-checker branch October 2, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print current version
1 participant