Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
/ common-utils Public archive

🤹 Common Kotlin utilities made for my personal usage, comes with SLF4J utilities, common extensions, common Gradle utilities, and more.

License

Notifications You must be signed in to change notification settings

AugustArchive/common-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ac5784a Â· Jan 10, 2024
Nov 29, 2023
Mar 23, 2023
Mar 23, 2023
Jan 9, 2024
Jan 10, 2024
Dec 19, 2023
Mar 23, 2023
Dec 21, 2023
Nov 29, 2023
Mar 23, 2023
Aug 25, 2022
Jan 9, 2024
Mar 23, 2023
Apr 30, 2022
Jan 26, 2023
Dec 3, 2022
Mar 23, 2023
Mar 23, 2023
Oct 5, 2023
Nov 25, 2022
May 2, 2022
Dec 14, 2023

Repository files navigation

🤹 Noel's Java/Kotlin Utilities

Common Java and Kotlin utilities personalized for myself. Comes with SLF4J, extensions for Kotlin/Koin/Gradle/Exposed, and more!

📜 Documentation

commons-utils is a Java and Kotlin library for handling utilities that I use in my projects.

Utilities

java-utils adds some additional utilities for Java-related programming.

The SetOnce class lets an object be initialized once and can't be ever set again. It's useful if you wish to have values in your Java classes to be initialized only once and never again when your application is running.

private static final SetOnce<String> someString = new SetOnce<>();

someString.getValue();        // => throws IllegalStateException
someString.getValueOrNull();  // => `null`
someString.wasSet();          // => false
someString.setValue("hello"); // => void
someString.getValue();        // => "hello"
someString.getValueOrNull();  // => "hello"
someString.wasSet();          // => true
someString.setValue("world"); // => void
someString.getValue();        // => "hello"

Installation

Gradle

Kotlin DSL

repositories {
    maven {
        url = uri("https://maven.floofy.dev/repo/releases")
    }
}

dependencies {
    implementation("dev.floofy.commons:<package>:<VERSION>")
}

Groovy DSL

repositories {
    maven {
        url "https://maven.floofy.dev/repo/releases"
    }
}

dependencies {
    implementation "dev.floofy.commons:<package>:<VERSION>"
}

Maven

<repositories>
    <repository>
        <id>noel-maven</id>
        <url>https://maven.floofy.dev/repo/releases</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>dev.floofy.commons</groupId>
        <artifactId>{{PACKAGE}}</artifactId>
        <version>{{VERSION}}</version>
        <type>pom</type>
    </dependency>
</dependencies>

License

common-utils is released under the MIT License, with love by Noel. :3