Skip to content

farsroidx pre-built codes for faster and easier Android app development.

License

Notifications You must be signed in to change notification settings

farsroidx/andromeda-core

Repository files navigation

Andromeda-Core Android Kotlin

A library for using pre-built codes

GitHub repo size

Installation:

1. Add Jitpack Maven:

in settings.gradle:
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        .
        .
        ------> maven { url 'https://jitpack.io' }
    }
}
in settings.gradle.kts:
@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        .
        .
        ------> maven(url = "https://jitpack.io")
    }
}

2. Copy the following line in section dependencies in file build.gradle of module app and replace it with LATEST_VERSION according to the latest version in the repository:

LATEST_VERSION:

in build.gradle:
dependencies {
    implementation 'com.github.farsroidx:andromeda-core:🔝LATEST_VERSION🔝'
}
in build.gradle.kts:
dependencies {
    implementation("com.github.farsroidx:andromeda-core:🔝LATEST_VERSION🔝")
}

3. Adding the following rules to use R8 and proguard in proguard-rules.pro:

# Keep all classes and interfaces in ir.farsroidx.m31 package
-keep class ir.farsroidx.m31.** { *; }

# Keep all class members (fields and methods) in ir.farsroidx.m31 package
-keepclassmembers class ir.farsroidx.m31.** { *; }

# Keep all public methods in ir.farsroidx.m31 package
-keepclassmembers class ir.farsroidx.m31.** {
    public <methods>;
    public <fields>;
}

# Keep all extension functions in ir.farsroidx.m31 package
-keepclassmembers class ir.farsroidx.m31.** {
    public <methods>;
    public <fields>;
}

# Keep property delegates
-keep class kotlin.Lazy { *; }
-keep class kotlin.LazyKt { *; }
-keep class kotlin.reflect.KProperty { *; }
-keep class kotlin.reflect.KProperty0 { *; }
-keep class kotlin.reflect.KProperty1 { *; }
-keep class kotlin.reflect.KProperty2 { *; }

# Prevent warnings for java.lang.invoke.StringConcatFactory
-dontwarn java.lang.invoke.StringConcatFactory

Ask Me Anything !