You're viewing documentation for a previous version of this software.Switch to the latest stable version
PESDK/Android/Introduction
Migration from v6
Look for a straightforward migration of the PhotoEditor SDK v6.
1. Update the Plugin to v7#
Please ensure that our artifactory.img.ly repository is listed in your repositories in the project's build.gradle
file,
and you use at least v7.6.5 of the SDK.
// Add the PESDK repository and plugin dependencybuildscript {repositories {google()gradlePluginPortal()maven { url 'https://artifactory.img.ly/artifactory/imgly' }}dependencies {// Insert the latest SDK version number here. You will find it here https://github.com/imgly/pesdk-android-demo/releasesclasspath 'ly.img.android.pesdk:plugin:7.6.5'}}
2. Update the config syntax#
This is a OPTIONAL step if you only use the PhotoEditor SDK
After updating the plugin to the newest version you can now update the old pesdkConfig the new one 'imglyConfig'. To do so:
- Rename
pesdkConfig { ... }
toimglyConfig { ... }
- add a
pesdk
block with the instructionsenable true
- move the instruction
licencePath *YOU LICENCE FILE NAME*
inside thepesdk
block. - [OPTIONAL:] shorten your module includes like here:
(Since v7 you don't have to include the backend module if you use the UI module)
// Apply the Android Pluginapply plugin: 'com.android.application'// Apply the PESDKPluginapply plugin: 'ly.img.android.sdk'// Configure the PESDKPluginimglyConfig {pesdk {enabled truelicencePath 'pesdk_android_license'}// If you use another supportLibVersion ('com.android.support'), change this version here to update your own supportLibVersionsupportLibVersion "28.0.0"// Define the modules you are needmodules {// Add all the UI modules you are needinclude 'ui:core'include 'ui:text'include 'ui:focus'include 'ui:frame'include 'ui:brush'include 'ui:filter'include 'ui:camera'include 'ui:sticker'include 'ui:overlay'include 'ui:transform'include 'ui:adjustment'include 'ui:text-design'// Add the serializer if you needinclude 'backend:serializer'// Add asset packs if you needinclude 'assets:font-basic'include 'assets:frame-basic'include 'assets:filter-basic'include 'assets:overlay-basic'include 'assets:sticker-shapes'include 'assets:sticker-emoticons'}}
3. Auto migrate your code.#
To update your code from v7 to v6:
- Make a backup of your project first.
- Go into the console and call the command
./gradlew migrate_pesdk_v6_to_v7 --no-daemon
- Confirm that you have made a backup.
4. Manually update deprecations.#
This is a OPTIONAL step
SettingsList
are deprecated now use PhotoEditorSettingsList and PhotoEditorSaveSettings instead.EditorLoadSettings
are deprecated use LoadSettings instead.EditorSaveSettings
are deprecated now use PhotoEditorSaveSettings and VideoEditorSaveSettings instead.