Skip to content

📚 Library of common Android utilities, including data manipulation & async utils.

License

Notifications You must be signed in to change notification settings

regulad/regulib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReguLib

wakatime

Maven Central Version

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:

Installation

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.

Publishing

To publish a new version of ReguLib, you need to have the following environment variables set:

  • OSSRH_USERNAME: Your Sonatype username
  • OSSRH_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