diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d46f6dfe..d0dc81eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,10 +16,10 @@ jobs: - name: Gradle Wrapper Validation uses: gradle/wrapper-validation-action@v1 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - name: Assemble diff --git a/CHANGELOG.md b/CHANGELOG.md index cbd5657c..f2ad277c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,33 @@ # PhotoEditor SDK - Changelog +## v10.8.1 + +### Fixed +* [VideoEditorSDK] Video export was limited by the frame rate limiter. +* [VideoEditorSDK] When the video source changes rapidly, there may be issues with the IMGLYFileReader not waiting properly. This can lead to unexpected outcomes, such as trim start and end times not being accurate. +* [VideoEditorSDK] `ArithmeticException` in `VideoCompositionSettings` when source is changed. +* [PhotoEditorSDK] Exporting images on the Pixel 8 (Pro) and maybe other devices, result in an endless export spinner. +* `AcceptTextButton` not visible for un-cancellable tool panels. +* Build issues with Android 14 +* Camera is not working on some phones. +* Camera preview aspect ratio is not the same as the captured image. +* When only one line is drawn, the brush tool might be deserialized with the wrong size after the source is changed. +* If the image is smaller than the display resolution, the accuracy of the pipette's source position may be compromised. +* Crash in the TextDesign and Sticker tool when the user clicks too fast in the menu. +* ConfigLoader (React Native, Cordova/Ionic) + * `personalVideoClips` is not disabled correctly if the video library is not used. +* Kotlin 1.9.0+ compatibility issues, by using KSP. +* Change + +### Changed +* 🚨 Minimum compileSdkVersion version of the `ui:camera` and `backend:camera` module is now 33 +* 🚨 Replaced font 'Galano' with font 'Lexend Bold', 'Campton' with 'Outfit Bold', 'Wolesbro' with 'Cookie', and 'Amberlight' with 'Allison'. +* KSP (Kotlin Symbol Processing) can now be activated as an alternative to KAPT (Kotlin Annotation Processing Tool) for annotation processing. + * 🚨 This feature is automatically enabled when you add the KSP plugin into your project. + * If auto-detection fails, you can manually enable it using the following configuration: `imglyConifg { useKspProcessor = true }` + +## ~~v10.8.0~~ (Broken release, don't use it!) +* This version was recalled due to an error + ## v10.7.3 ### Fixed diff --git a/README.md b/README.md index 6b021d17..dbc7faa6 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,8 @@ buildscript { maven { url "https://artifactory.img.ly/artifactory/imgly" } } dependencies { - classpath 'ly.img.android.pesdk:plugin:10.7.3' + classpath 'ly.img.android.pesdk:plugin:10.8.1' + classpath("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.6.21-1.0.6") } } @@ -133,6 +134,7 @@ apply plugin: 'com.android.application' // Apply the IMGLYPlugin apply plugin: 'ly.img.android.sdk' +apply plugin: 'com.google.devtools.ksp' // Configure the PESDKPlugin imglyConfig { diff --git a/app/build.gradle b/app/build.gradle index 0e74a562..32ace048 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.application' apply plugin: 'ly.img.android.sdk' apply plugin: 'kotlin-android' +apply plugin: 'com.google.devtools.ksp' imglyConfig { @@ -43,13 +44,15 @@ imglyConfig { } android { - compileSdkVersion 31 - buildToolsVersion '30.0.3' + namespace "com.photoeditorsdk.android.app" + + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { applicationId "com.photoeditorsdk.android.app" minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion 34 versionCode 1 versionName "1.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index f1b42451..481bb434 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,4 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5c0aa830..fd2e20ae 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + @@ -14,7 +13,9 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> - diff --git a/build.gradle b/build.gradle index 05331d07..d135e360 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,17 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.5.32' - ext.pesdk_version = '10.7.3' // Insert the latest SDK version here. You will find it here https://github.com/imgly/pesdk-android-demo/releases + ext.kotlin_version = '1.6.21' + ext.ksp_version = '1.6.21-1.0.6' + ext.pesdk_version = '10.8.1' // Insert the latest SDK version here. You will find it here https://github.com/imgly/pesdk-android-demo/releases repositories { google() gradlePluginPortal() maven { url 'https://artifactory.img.ly/artifactory/imgly' } + maven { url 'https://artifactory.img.ly/artifactory/imgly_development' } } dependencies { - classpath 'com.android.tools.build:gradle:4.0.2' + classpath 'com.android.tools.build:gradle:8.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong @@ -17,6 +19,7 @@ buildscript { // Insert the latest SDK version number here. You will find it here https://github.com/imgly/pesdk-android-demo/releases classpath "ly.img.android.pesdk:plugin:$pesdk_version" + classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:$ksp_version" } } @@ -25,6 +28,7 @@ allprojects { google() mavenCentral() maven { url 'https://artifactory.img.ly/artifactory/imgly' } + maven { url 'https://artifactory.img.ly/artifactory/imgly_development' } } } diff --git a/example_brush_presets_panel/.gitignore b/example_brush_presets_panel/.gitignore deleted file mode 100644 index 796b96d1..00000000 --- a/example_brush_presets_panel/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/example_brush_presets_panel/build.gradle b/example_brush_presets_panel/build.gradle deleted file mode 100644 index 8f2c4cf2..00000000 --- a/example_brush_presets_panel/build.gradle +++ /dev/null @@ -1,80 +0,0 @@ -apply plugin: 'com.android.application' - -apply plugin: 'ly.img.android.sdk' -apply plugin: 'kotlin-android' - -imglyConfig { - - pesdk { - enabled true - licencePath 'LICENSE' // Name of the Licence file in the asset folder - } - - // Define the modules you are need - modules { - // Add all the UI modules you are need - 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' - - // Add the serializer if you need - include 'backend:serializer' - - // Allow Background Encoding [Optional] - include 'backend:headless' - - // Add asset packs if you need - include 'assets:font-basic' - include 'assets:frame-basic' - include 'assets:filter-basic' - include 'assets:overlay-basic' - include 'assets:sticker-shapes' - include 'assets:sticker-emoticons' - include 'backend:sticker-smart' - } -} - -android { - compileSdkVersion 31 - buildToolsVersion '30.0.3' - - defaultConfig { - applicationId "com.photoeditorsdk.android.app" - minSdkVersion 21 - targetSdkVersion 30 - versionCode 1 - versionName "1.0" - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - - resValue 'string', 'pesdk_version', "v$pesdk_version" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - lintOptions { - abortOnError false - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.3.1' -} diff --git a/example_brush_presets_panel/proguard-rules.pro b/example_brush_presets_panel/proguard-rules.pro deleted file mode 100644 index f1b42451..00000000 --- a/example_brush_presets_panel/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/example_brush_presets_panel/src/main/AndroidManifest.xml b/example_brush_presets_panel/src/main/AndroidManifest.xml deleted file mode 100644 index 5c0aa830..00000000 --- a/example_brush_presets_panel/src/main/AndroidManifest.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example_brush_presets_panel/src/main/assets/LICENSE b/example_brush_presets_panel/src/main/assets/LICENSE deleted file mode 100644 index e8c9727f..00000000 --- a/example_brush_presets_panel/src/main/assets/LICENSE +++ /dev/null @@ -1 +0,0 @@ -{"owner":"Imgly","version":"2.1","enterprise_license":false,"available_actions":["magic","filter","transform","sticker","text","adjustments","brush","focus","frames","camera"],"features":["adjustment","filter","focus","overlay","transform","text","sticker","frame","brush","camera","textdesign","library","export"],"platform":"Android","app_identifiers":["com.photoeditorsdk.android.app"],"api_token":"-lIPN9NGKvlJBI90zPVrFg","domains":["https://api.photoeditorsdk.com"],"issued_at":1528984457,"expires_at":null,"signature":"h3Q0G/1HZg+t9WXXYQ+b6YSbGHc3UOq1ktOci5tNf4xTV+A7igkTPCYbxSIELZUyAr+9idZNt8Z1thIVQ+3Kzaq7kCzaDgl+vHAglrxHTZuscg8gPjSGrfXWUeUNA0PZUXY72q5DYVc8BRaTrCdnIfZPScnvi1QmV/+M/ao2VGq98/Mu8jb4jHXpj3f/zTlsaBwUgLFCerR2nEYm8m0cpjxuGu1DSIKxCC8JgTxhPLC+w8LS0+gSlfps69lVUap7VyAj9DWCARQDfeHSAnokYzvTu0GL7xglCWuZbutaVezA//oWaa0qIDY66tOXBKosULRp2VqShATmfbvnIueAkEhWZSyMX+G6MRI1VYHtI4Q5YhMQLSWFvsIP6oVLJs+iiMpUXtcglGp85TGY9x2fQcJuWAbvFm7vYnTJqTHyiU81uZF+goC/N8zLrn8gORreOmdvDqQ7Sff65k8I9+D6cv7gtZGw4mxGohbMGqPuTFCXlbsCCA/58KTYJoqme/wPxqB0yhBE9VBU3W/y3TFjsv5ZmhZH1YheiN/fTOlnwSij8ZeaFCLtkNcfSmS7EWhPDWfZxptiRS7/BJqVRYxRwRc4W3KWMc30EiWCm0F+WDW64z0ayLH0g8KA56eaDR/8P1P0TNPJh8uS9t56HmvBmEU5pDrVm+BQRP3oPf3OFss="} \ No newline at end of file diff --git a/example_brush_presets_panel/src/main/ic_launcher-web.png b/example_brush_presets_panel/src/main/ic_launcher-web.png deleted file mode 100644 index d6d766a7..00000000 Binary files a/example_brush_presets_panel/src/main/ic_launcher-web.png and /dev/null differ diff --git a/example_brush_presets_panel/src/main/java/com/photoeditorsdk/android/app/KEditorDemoActivity.kt b/example_brush_presets_panel/src/main/java/com/photoeditorsdk/android/app/KEditorDemoActivity.kt deleted file mode 100644 index 2f5daceb..00000000 --- a/example_brush_presets_panel/src/main/java/com/photoeditorsdk/android/app/KEditorDemoActivity.kt +++ /dev/null @@ -1,171 +0,0 @@ -package com.photoeditorsdk.android.app - -import android.app.Activity -import android.content.ActivityNotFoundException -import android.content.Intent -import android.net.Uri -import android.os.Build -import android.os.Bundle -import android.os.Environment -import android.provider.MediaStore -import android.util.Log -import android.widget.Button -import android.widget.Toast -import com.photoeditorsdk.android.app.presets.BrushPresetCustomItem -import com.photoeditorsdk.android.app.presets.BrushPresetItem -import com.photoeditorsdk.android.app.presets.BrushPresetPanel -import com.photoeditorsdk.android.app.presets.BrushPresetSettings -import java.io.File -import java.io.IOException -import ly.img.android.pesdk.PhotoEditorSettingsList -import ly.img.android.pesdk.assets.filter.basic.FilterPackBasic -import ly.img.android.pesdk.assets.font.basic.FontPackBasic -import ly.img.android.pesdk.assets.frame.basic.FramePackBasic -import ly.img.android.pesdk.assets.overlay.basic.OverlayPackBasic -import ly.img.android.pesdk.assets.sticker.emoticons.StickerPackEmoticons -import ly.img.android.pesdk.assets.sticker.shapes.StickerPackShapes -import ly.img.android.pesdk.backend.model.EditorSDKResult -import ly.img.android.pesdk.backend.model.constant.OutputMode -import ly.img.android.pesdk.backend.model.state.LoadSettings -import ly.img.android.pesdk.backend.model.state.PhotoEditorSaveSettings -import ly.img.android.pesdk.kotlin_extension.ColorValue -import ly.img.android.pesdk.ui.activity.PhotoEditorBuilder -import ly.img.android.pesdk.ui.model.state.* -import ly.img.android.pesdk.ui.panels.item.PersonalStickerAddItem -import ly.img.android.pesdk.ui.utils.PermissionRequest -import ly.img.android.serializer._3.IMGLYFileWriter - -class KEditorDemoActivity : Activity() { - - companion object { - const val PESDK_RESULT = 1 - const val GALLERY_RESULT = 2 - } - - // Create a empty new SettingsList and apply the changes on this reference. - // If you include our asset Packs and use our UI you also need to add them to the UI Config, - // otherwise they are only available for the backend (like Serialisation) - // See the specific feature sections of our guides if you want to know how to add your own Assets. - private fun createPesdkSettingsList() = - PhotoEditorSettingsList(true) - .configure { - it.setFilterList(FilterPackBasic.getFilterPack()) - } - .configure { - it.setFontList(FontPackBasic.getFontPack()) - } - .configure { - it.setFrameList(FramePackBasic.getFramePack()) - } - .configure { - it.setOverlayList(OverlayPackBasic.getOverlayPack()) - } - .configure { - it.setStickerLists( - PersonalStickerAddItem(), - StickerPackEmoticons.getStickerCategory(), - StickerPackShapes.getStickerCategory() - ) - } - .configure { - // Set custom editor image export settings - it.setOutputToGallery(Environment.DIRECTORY_DCIM) - it.outputMode = OutputMode.EXPORT_IF_NECESSARY - }.also { - enableBrushPresets(it) - } - - private fun enableBrushPresets(settingsList: PhotoEditorSettingsList) = - settingsList - .configure { - BrushPresetPanel.Companion // This line is necessary to be sure that the static initialisation is done and the tool is replaced. - it.presetList.also { presets -> - presets.add(BrushPresetItem("Red", 0.01f, 0.5f, ColorValue(1.0f, 255, 0, 0))) - presets.add(BrushPresetItem("Green", 0.01f, 0.5f, ColorValue(1.0f, 0, 255, 0))) - presets.add(BrushPresetItem("Marker", 0.03f, 1f, ColorValue(0.5f, 255, 255, 0))) - presets.add(BrushPresetCustomItem("Default")) - } - } - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - val openGallery = findViewById