Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.44 KB

README.md

File metadata and controls

53 lines (39 loc) · 1.44 KB

LibChecker-Rules-Bundle

Make it easy to use LibChecker marked libraries rules in your apps.

Download

repositories {
    maven { url 'https://jitpack.io' }
}
dependencies {
    implementation "com.github.LibChecker:LibChecker-Rules-Bundle:${latest_version}"

    // Required: AndroidX Room
    implementation 'androidx.room:room-runtime:2.5.0'
    implementation 'androidx.room:room-ktx:2.5.0'

    // Required: Kotlin Coroutines
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0'
}

Quick Tutorial

Initialize SDK in Application class

class App : Application() {

  override fun onCreate() {
    super.onCreate()
    LCRules.init(this)
    
    // Optional: set online repo (GitHub repo as default)
    LCRules.setRemoteRepo(LCRemoteRepo.GitHub)
    
    // WIP: set rules locale
    LCRules.setLocale(LCLocale.ZH)
  }

Get marked rule

// Native library
val rule: Rule = LCRules.getRule(name = "libflutter.so", type = NATIVE, useRegex = false)

// Activity library
val rule2: Rule = LCRules.getRule(name = "androidx.compose.ui.tooling.PreviewActivity", type = ACTIVITY, useRegex = false)

// Query library with RegEx
val rule3: Rule = LCRules.getRule(name = "libAMapSDK_MAP_v7_9_1.so", type = NATIVE, useRegex = true)