Skip to content

Commit

Permalink
Add version 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leontobias committed Mar 27, 2024
1 parent 83fd896 commit 8d03a81
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 99 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## [3.1.0]

### Changed

* [video_editor_sdk] Raised minimum VideoEditor SDK for Android version to 10.9.0. See the [migration guide](https://img.ly/docs/vesdk/flutter/getting-started/migration-guides/3-1-0/) for more information.
* [photo_editor_sdk] Raised minimum PhotoEditor SDK for Android version to 10.9.0. See the [migration guide](https://img.ly/docs/pesdk/flutter/getting-started/migration-guides/3-1-0/) for more information.

### Fixed

* Fixed potential crash on Android: `IllegalStateException "You need to use a Theme.AppCompat theme (or descendant) with this activity."`.
* Fixed potential compiling issues due to missing namespace for Android.

## [3.0.0]

### Changed
Expand Down Expand Up @@ -108,7 +120,7 @@

### Changed

* The img.ly maven repository is no longer automatically added to your Android project by the plugin. Please refer to the new step 3 in the [getting started](https://github.com/imgly/vesdk-flutter#android) section of the README for instructions on how to add it.
* The IMG.LY maven repository is no longer automatically added to your Android project by the plugin. Please refer to the new step 3 in the [getting started](https://github.com/imgly/vesdk-flutter#android) section of the README for instructions on how to add it.
* Added support for PhotoEditor SDK and VideoEditor SDK for Android version 9.

### Added
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In order to run any samples or use any wrapper without a watermark,
you'll have to purchase a commercial PhotoEditor SDK or VideoEditor SDK
license. Visit https://img.ly for more details.

Copyright (c) 2014-2023, img.ly GmbH
Copyright (c) 2014-2024, IMG.LY GmbH
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -17,7 +17,7 @@ modification, are permitted provided that the following conditions are met:
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name img.ly GmbH, img.ly, PhotoEditor SDK, VideoEditor SDK
3. Neither the name IMG.LY GmbH, IMG.LY, PhotoEditor SDK, VideoEditor SDK
nor the names of its developers may be used to endorse or promote products
derived from this software without specific prior written permission.

Expand Down
77 changes: 14 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add the plugin package to the `pubspec.yaml` file in your project:

```yaml
dependencies:
video_editor_sdk: ^3.0.0
video_editor_sdk: ^3.1.0
```
Install the new dependency:
Expand All @@ -39,66 +39,14 @@ Install the new dependency:
flutter pub get
```

### Known Issues

With version `2.4.0`, we recommend using `compileSdkVersion` not lower than `31` for Android. However, this might interfere with your application's Android Gradle Plugin version if this is set to `4.x`.

If you don't use a newer Android Gradle Plugin version you'll most likely encounter a build error similar to:

```
FAILURE: Build failed with an exception.
* Where:
Build file 'flutter_test_application/android/build.gradle' line: 30
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
```

**As a workaround you can either:**

1. Upgrade your Android Gradle Plugin version:

Inside `android/build.gradle` update the version to at least `7.0.0`:

```diff
buildscript {
...
dependencies {
- classpath 'com.android.tools.build:gradle:4.1.1'
+ classpath 'com.android.tools.build:gradle:7.0.0'
...
}
}
```

After this, you need to update the Gradle version as well in `android/gradle/gradle-wrapper.properties`:

```diff
- distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
```

2. **Or** create the following symlinks:

- Inside `/Users/YOUR-USERNAME/Library/Android/sdk/build-tools/31.0.0/`: Create a `dx` symlink for the `d8` file with `ln -s d8 dx`.
- From there, go to `./lib/` and create a `dx.jar` symlink for the `d8.jar` file with `ln -s d8.jar dx.jar`.

### Android

1. Add the img.ly repository and plugin by opening the `android/build.gradle` file (**not** `android/app/build.gradle`) and changing the following block:
1. Add the IMG.LY repository and plugin by opening the `android/build.gradle` file (**not** `android/app/build.gradle`) and changing the following block:

```diff
buildscript {
- ext.kotlin_version = '1.3.50'
+ ext.kotlin_version = '1.5.32' // Minimum version.
+ ext.kotlin_version = '1.7.21'
repositories {
...
mavenCentral()
Expand All @@ -107,13 +55,16 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug
}
dependencies {
...
+ classpath 'ly.img.android.sdk:plugin:10.4.1'
+ classpath 'com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.7.21-1.0.8' // Depending on your `kotlin_version` version.
+ classpath 'ly.img.android.sdk:plugin:10.9.0'
...
}
}
```

In order to update VideoEditor SDK for Android replace the version string `10.4.1` with a [newer release](https://github.com/imgly/pesdk-android-demo/releases).
The KSP version depends on the Kotlin version that you are using. In order to find the correct version, please visit the [official KSP release page](https://github.com/google/ksp/releases?page=1).

In order to update VideoEditor SDK for Android replace the version string `10.9.0` with a [newer release](https://github.com/imgly/pesdk-android-demo/releases).

2. Still in the `android/build.gradle` file (**not** `android/app/build.gradle`), add these lines at the bottom:

Expand All @@ -125,13 +76,13 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug
}
```

3. In the `android/app/build.gradle` file (**not** `android/build.gradle`) you will need to modify the `minSdkVersion` to at least `21`. We also recommend to update the `buildToolsVersion` to `31.0.0` or higher as well as the `compileSdkVersion` to `31` or higher:
3. In the `android/app/build.gradle` file (**not** `android/build.gradle`) you will need to modify the `minSdkVersion` to at least `21` depending on the version of Flutter that you are using. We also recommend to update the `buildToolsVersion` to `34.0.0` as well as the `compileSdkVersion` to `34`:

```diff
android {
- compileSdkVersion flutter.compileSdkVersion
+ compileSdkVersion 31
+ buildToolsVersion "31.0.0"
+ compileSdkVersion 34
+ buildToolsVersion "34.0.0"
...
defaultConfig {
...
Expand All @@ -148,8 +99,8 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug
```diff
android {
- compileSdkVersion 30
+ compileSdkVersion 31
+ buildToolsVersion "31.0.0"
+ compileSdkVersion 34
+ buildToolsVersion "34.0.0"
...
defaultConfig {
...
Expand All @@ -168,7 +119,7 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug
apply plugin: 'kotlin-android'
// Comment out the modules you don't need, to save size.
imglyConfig {
IMGLY.configure {
modules {
include 'ui:text'
include 'ui:focus'
Expand Down
13 changes: 8 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ group 'ly.img.flutter.video_editor_sdk'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.5.32'
ext.kotlin_version = '1.7.21'

repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.android.tools.build:gradle:8.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -26,7 +26,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'ly.img.android.sdk'

imglyConfig {
IMGLY.configure {
vesdk {
enabled true
}
Expand All @@ -39,7 +39,7 @@ imglyConfig {
}
}

def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "10.4.1"
def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "10.9.0"

task checkVersion {
if (imglyConfig.convertToVersionNumber(imglyConfig.getVersion()) < imglyConfig.convertToVersionNumber(MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION)) {
Expand All @@ -58,7 +58,10 @@ task checkVersion {
preBuild.dependsOn checkVersion

android {
compileSdkVersion 31
if (project.android.hasProperty("namespace")) {
namespace "ly.img.flutter.video_editor_sdk"
}
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
4 changes: 3 additions & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
android:exported="false"
android:enabled="false"
android:name="ly.img.android.IMGLYAutoInit" />
<activity android:name="FlutterVESDKActivity" />
<activity
android:theme="@style/Theme.Imgly"
android:name="FlutterVESDKActivity" />
</application>
</manifest>
7 changes: 4 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'ly.img.android.sdk'

imglyConfig {
IMGLY.configure {
modules {
include 'ui:text'
include 'ui:focus'
Expand Down Expand Up @@ -62,7 +62,8 @@ imglyConfig {
}

android {
compileSdkVersion 31
namespace 'ly.img.flutter.video_editor_sdk_example'
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -76,7 +77,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "ly.img.flutter.video_editor_sdk_example"
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 2 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
Expand Down
9 changes: 5 additions & 4 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext.kotlin_version = '1.5.32'
ext.vesdk_version = '10.4.1'
ext.kotlin_version = '1.7.21'
ext.vesdk_version = '10.9.0'

repositories {
google()
Expand All @@ -9,7 +9,8 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.7.21-1.0.8'
classpath 'com.android.tools.build:gradle:8.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "ly.img.android.pesdk:plugin:$vesdk_version"
}
Expand All @@ -30,7 +31,7 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
20 changes: 10 additions & 10 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PODS:
- Flutter (1.0.0)
- imgly_sdk (3.0.0):
- imgly_sdk (3.1.0):
- Flutter
- imglyKit (~> 11.4)
- imglyKit (11.5.1)
- video_editor_sdk (3.0.0):
- imglyKit (11.8.1)
- video_editor_sdk (3.1.0):
- Flutter
- imgly_sdk (= 3.0.0)
- imgly_sdk (= 3.1.0)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -26,11 +26,11 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/video_editor_sdk/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
imgly_sdk: a114555e1d98e4a4fa5cc8f2b258353198c64e8b
imglyKit: b1b3b827799a50b090433ca7c61f90b078944898
video_editor_sdk: f113d4a2fc8838fdeee99a8461fb4c55ba6b9e3f
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
imgly_sdk: a1eb428ecbe210db5e089a06ee4e5a64d2f94c10
imglyKit: daebaf36406434d9efaa475386522d09456cee95
video_editor_sdk: 1d450fa61d41b424666023ea1fdf463ad47aa279

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

COCOAPODS: 1.10.2
COCOAPODS: 1.15.2
9 changes: 5 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -204,6 +204,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down Expand Up @@ -341,7 +342,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -427,7 +428,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -476,7 +477,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Loading

0 comments on commit 8d03a81

Please sign in to comment.