ReguLib is an Android library used by my Android projects.
It provides commonly-reused utilities, including:
- Kotlin cold Flow caching
- Reliable worry-free Bluetooth LE & WiFi Direct connections
- Subnet scanning
- Flow transformation utilities
- Composable Flow utilities
- A plethora of Jetpack Compose functions
- Jetpack Compose "remember" functions for system services, like sensors and time
- Compose layout utils (grids, etc.)
- QR generation components
- Mjpeg streams, among other types of streams for Compose
- Version-agnostic support for Java 1.8 Collection & Map features under Kotlin WITHOUT desugaring
- And more!
For more info, check out the JavaDoc at one of the links below:
- https://regulad.github.io/regulib/common
- https://regulad.github.io/regulib/ble
- https://regulad.github.io/regulib/wifi
- https://regulad.github.io/regulib/compose
ReguLib is available on Maven Central.
Get the version from the badge above, and add the following to your build.gradle.kts
per-module file:
dependencies {
implementation("xyz.regulad:regulib-common:$version")
implementation("xyz.regulad:regulib-ble:$version")
implementation("xyz.regulad:regulib-wifi:$version")
implementation("xyz.regulad:regulib-compose:$version")
}
You may run into version conflicts if you use other libraries that depend on different versions of Kotlin or other
libraries. Check the gradle/libs.versions.toml
for the versions of dependencies ReguLib relies on.
Due to the size of the libraries, it is highly recommended to set up ProGuard rules to remove unused code.
To publish a new version of ReguLib, you need to have the following environment variables set:
OSSRH_USERNAME
: Your Sonatype usernameOSSRH_PASSWORD
: Your Sonatype password
In addition, you also have to have Gradle signing set up. You can do this by creating a gradle.properties
file in your
home directory with the following contents:
signing.keyId=YOUR_KEY_ID
signing.password=YOUR_KEY_PASSWORD
signing.secretKeyRingFile=/path/to/your/.gnupg/secring.gpg
Then, you can run the following command to publish:
./gradlew publish closeAndReleaseStagingRepositories