/service-loader-android

ServiceLoader performance optimization for Android (Deprecated, use didi/booster instead)

Primary LanguageKotlinApache License 2.0Apache-2.0

Service Loader for Android

This project is used to optimize Java Service Provider Interface on Android.

Getting Started

The transformer depends Booster Framework, so, the booster-gradle-plugin should be contained in classpath of buildscript:

buildscript {
    ext.kotlin_version = "1.3.50"
    repositories {
        mavenLocal()
        mavenCentral()
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.5.0")
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        classpath("com.didiglobal.booster:booster-gradle-plugin:1.3.1")

        classpath("io.johnsonlee.spi:booster-transform-service-loader:1.0.0")
    }
}

Then apply booster gradle plugin:

apply plugin: "com.android.application"
apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"
apply plugin: 'kotlin-kapt'
apply plugin: "com.didiglobal.booster"

Example

Here is the example project