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/app/build.gradle b/app/build.gradle index 896f2ca9..e2c554fa 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -44,8 +44,10 @@ 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" 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..f017af32 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/build.gradle b/build.gradle index 7b14bcee..d135e360 100644 --- a/build.gradle +++ b/build.gradle @@ -3,11 +3,12 @@ buildscript { ext.kotlin_version = '1.6.21' ext.ksp_version = '1.6.21-1.0.6' - ext.pesdk_version = '10.8.0' // Insert the latest SDK version here. You will find it here https://github.com/imgly/pesdk-android-demo/releases + 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:8.1.2' @@ -27,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