Integration
Free Trial#
Our tech is modified to be used for testing purposes without a
license key. To start testing, just follow the Integration guide and set the licensePath
to null
.
The editor will simply render a watermark over the preview and final results. And in case you need
any technical assistance, make sure to reach out to us:
https://img.ly/support. We’ll be glad to help.
Requirements#
PhotoEditor SDK requires:
minSdkVersion
21+compileSdkVersion
35+- AndroidX
- Android Gradle Plugin 8.1.2+
- Gradle 8.0+
- Kotlin 1.8.0+
- Java 17+
IMG.LY Gradle Plugin#
This plugin provides a convenient way to integrate the PhotoEditor SDK into your application.
IMG.LY repository#
Within your project's settings.gradle
file, include the IMG.LY Maven repository:
pluginManagement {repositories {gradlePluginPortal()google()mavenCentral()maven { url 'https://artifactory.img.ly/artifactory/imgly' }}}dependencyResolutionManagement {repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)repositories {google()mavenCentral()maven { url 'https://artifactory.img.ly/artifactory/imgly' }}}
Plugin Configuration#
After applying the IMG.LY, Kotlin, and KSP plugins, insert the IMGLY.configure block in your module's build.gradle
file:
plugins {id 'com.android.application'id 'org.jetbrains.kotlin.android'id 'ly.img.android.sdk' version '10.10.0'// Add KSP-Plugin, the correct version depends on your Kotlin version.// Can be found here: https://github.com/google/ksp/releasesid 'com.google.devtools.ksp' version '1.8.21-1.0.11'}IMGLY.configure {pesdk {enabled truelicensePath 'pesdk_license'}modules {include 'ui:core'include 'ui:text'include 'ui:focus'include 'ui:frame'include 'ui:brush'include 'ui:filter'include 'ui:sticker'include 'ui:overlay'include 'ui:transform'include 'ui:adjustment'include 'ui:text-design'include 'backend:serializer'include 'backend:headless'include 'backend:background-removal'include 'backend:sticker-smart'include 'assets:font-basic'include 'assets:frame-basic'include 'assets:filter-basic'include 'assets:overlay-basic'include 'assets:sticker-shapes'include 'assets:sticker-emoticons'}}
Ensure you've set the correct version number for the ksp plugin. The version '1.6.21-1.+' used above is just an example. Always refer to the official documentation or repository to fetch the latest version.
The licensePath
refers to the path to your license file inside the assets
directory. If you do not have a license, set it to null
.
The above configuration includes all the PhotoEditor SDK modules. You can choose to remove the ones that you do not need. For more information, refer to the modules section.
Note: Prior to version 10.9.0, the syntax imglyConfig { }
was employed, which proved unstable due to the Gradle DSL plugins nature.
The revised syntax enhances safety and ensures deterministic outcomes. Migration is recommended wherever feasible.
Instead of imglyConfig {}
, you should now utilize:
// Replace the old syntax...imglyConfig {pesdk {...}modules {include ...}}// ...with the new syntaxIMGLY.configure {pesdk {...}modules {include ...}}
Note: If you have problems with the automatic plugin application, you can skip the plugin check by setting
IMGLY.configure {skipPluginCheck = true...}
Android library module#
If you are integrating the PhotoEditor SDK in an Android library module, IMGLY.configure {}
has two optional properties that you can configure -
useInheritanceDependencies
- Specifies whether the SDK is to be added to the module asapi
(seen by other modules) orimplementation
(private to this module). By default, its value isfalse
and the SDK is added asimplementation
.finalModule
- Specifies whether the module is the final module for annotation processing. By default, its value isfalse
. If the consumers of your library module do not use the@OnEvent
annotation, set this totrue
.