This fork hosts modified versions of some Android Jetpack modules and additional sesl.androidx.* modules. These are intended for implementing OneUI-styled Android applications while simultaneously enjoying the latest features and updates of Android Jetpack. This library is free for everyone to use.
Any form of contributions, including suggestions, bug reports, corrections, and feature requests, are welcome.
Info: Samsung’s One UI apps are created using heavily modified versions of some Android Jetpack and Material Components for Android libraries. These include (but are not limited to) custom themes/styles, custom implementations, and additional APIs. These are internally referenced as SESL. Samsung also added its own androidx modules.
These modules are intended for use together with sesl-material-components-android library.
In order to provide direct information about the equivalent official Android Jetpack module and the applied SESL version, sesl.
is prepended to the existing group id.
We also apply a versioning scheme that's a combination of the [Android Jetpack module version]
, [SESL version]
, and [internal version]
:
Example:
androidx.drawerlayout:drawerlayout:1.2.0
+1.0.1-sesl6
+rev0
This means that this module is based on
androidx.drawerlayout:drawerlayout:1.2.0
modified based onandroidx.drawerlayout:drawerlayout:1.0.1-sesl6
withrev0
to be incremented for any internal changes/bug-fixes.
To use these libraries in your project, set compileSdk to at least 34 and use Java 8(1.8) or higher. Then:
1. Depending on your app's setup, add the following either to allprojects section of the project-level build.gradle(.kts) or to the dependencyResolutionManagement section of settings.gradle(.kts). This will authenticate to the GitHub Packages registry using a personal access token with at least read:packages
scope. If you don’t have a personal access token yet, you can generate one.
repositories {
maven {
url = uri("https://maven.pkg.github.com/tribalfs/sesl-androidx")
credentials {
username = "<gh_username>"
password = "<gh_access_token>"
}
}
maven {
url = uri("https://maven.pkg.github.com/tribalfs/sesl-material-components-android")
credentials {
username = "<gh_username>"
password = "<gh_access_token>"
}
}
}
Note: If you are sharing your project, it's best to save these credentials in a separate file that's excluded from version control and expose them as project properties. Alternatively, you can save and access them as system env. variables.
2. Add the specific modules you need to the dependencies section of the app-level build.gradle(.kts)'s (replacing the equivalent Android Jetpack module, if any)
Example:
dependencies {
//sesl androidx
implementation "sesl.androidx.appcompat:appcompat:1.7.0+1.0.28-sesl6+rev0"
implementation "sesl.androidx.fragment:fragment:1.8.0+1.0.0-sesl6+rev0"
//sesl material
implementation "sesl.com.google.android.material:material:1.12.0+1.0.18-sesl6+rev0"
}
dependencies {
//sesl androidx
implementation("sesl.androidx.appcompat:appcompat:1.7.0+1.0.28-sesl6+rev0")
implementation("sesl.androidx.fragment:fragment:1.8.0+1.0.0-sesl6+rev0")
//sesl material
implementation ("sesl.com.google.android.material:material:1.12.0+1.0.18-sesl6+rev0")
}
2. Exclude implementations of the equivalent official Android Jetpack and Material Components for Android modules in order avoid duplicate class errors when compiling your app by adding the following in the app-level build.gradle(.kts):
configurations.implementation {
exclude (group:"androidx.core", module:"core")
exclude (group:"androidx.core", module:"core-ktx")
exclude (group:"androidx.customview", module:"customview")
exclude (group:"androidx.coordinatorlayout", module:"coordinatorlayout")
exclude (group:"androidx.drawerlayout", module:"drawerlayout")
exclude (group:"androidx.viewpager2", module:"viewpager2")
exclude (group:"androidx.viewpager", module:"viewpager")
exclude (group:"androidx.appcompat", module:"appcompat")
exclude (group:"androidx.fragment", module:"fragment")
exclude (group:"androidx.preference", module:"preference")
exclude (group:"androidx.recyclerview", module:"recyclerview")
exclude (group:"androidx.slidingpanelayout", module:"slidingpanelayout")
exclude (group:"androidx.swiperefreshlayout", module:"swiperefreshlayout")
exclude (group:"com.google.android.material", module: "material")
}
configurations.implementation {
exclude ("androidx.core", "core")
exclude ("androidx.core", "core-ktx")
exclude ("androidx.customview", "customview")
exclude ("androidx.coordinatorlayout", "coordinatorlayout")
exclude ("androidx.drawerlayout", "drawerlayout")
exclude ("androidx.viewpager2", "viewpager2")
exclude ("androidx.viewpager", "viewpager")
exclude ("androidx.appcompat", "appcompat")
exclude ("androidx.fragment", "fragment")
exclude ("androidx.preference", "preference")
exclude ("androidx.recyclerview", "recyclerview")
exclude ("androidx.slidingpanelayout", "slidingpanelayout")
exclude ("androidx.swiperefreshlayout", "swiperefreshlayout")
exclude ("com.google.android.material", "material")
}
-
About Android JetPack
Jetpack is a suite of libraries, tools, and guidance to help developers write high-quality apps easier. These components help you follow best practices, free you from writing boilerplate code, and simplify complex tasks, so you can focus on the code you care about.
Jetpack comprises the
androidx.*
package libraries, unbundled from the platform APIs. This means that it offers backward compatibility and is updated more frequently than the Android platform, making sure you always have access to the latest and greatest versions of the Jetpack components.Android JetPack official AARs and JARs binaries are distributed through Google Maven.
You can learn more about using it from Android Jetpack landing page.
- Google for their Jetpack and Material Components libraries.
- Samsung for their awesome OneUI Design.
- Yanndroid and Salvo Giangreco for their OneUI4 sesl library that highly inspired this project. Some commits are straightly cherry-picked from this project.