diff --git a/.gitignore b/.gitignore index 20789f2..59d6d57 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .idea/ .vscode/ .dart_tool -*.iml \ No newline at end of file +*.iml +pubspec_overrides.yaml diff --git a/image_editor/pubspec_overrides.yaml b/image_editor/pubspec_overrides.yaml deleted file mode 100644 index e06f16d..0000000 --- a/image_editor/pubspec_overrides.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# melos_managed_dependency_overrides: image_editor_common,image_editor_ohos,image_editor_platform_interface -dependency_overrides: - image_editor_common: - path: ../image_editor_common - image_editor_ohos: - path: ../image_editor_ohos - image_editor_platform_interface: - path: ../image_editor_platform_interface diff --git a/image_editor_common/android/build.gradle b/image_editor_common/android/build.gradle index 699066d..037006a 100644 --- a/image_editor_common/android/build.gradle +++ b/image_editor_common/android/build.gradle @@ -25,23 +25,23 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 31 + compileSdkVersion 35 sourceSets { main.java.srcDirs += 'src/main/kotlin' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } defaultConfig { - minSdkVersion 16 + minSdkVersion 19 } if (project.android.hasProperty('namespace')) { diff --git a/image_editor_common/android/src/main/kotlin/com/fluttercandies/image_editor/core/HandleExtension.kt b/image_editor_common/android/src/main/kotlin/com/fluttercandies/image_editor/core/HandleExtension.kt index f8d6c09..81c2441 100644 --- a/image_editor_common/android/src/main/kotlin/com/fluttercandies/image_editor/core/HandleExtension.kt +++ b/image_editor_common/android/src/main/kotlin/com/fluttercandies/image_editor/core/HandleExtension.kt @@ -7,7 +7,7 @@ import android.graphics.RectF import com.fluttercandies.image_editor.option.draw.* fun Bitmap.draw(option: DrawOption): Bitmap { - val newBitmap = Bitmap.createBitmap(width, height, config) + val newBitmap = Bitmap.createBitmap(width, height, config!!) val canvas = Canvas(newBitmap) canvas.drawBitmap(this, 0F, 0F, null) diff --git a/image_editor_common/android/src/main/kotlin/com/fluttercandies/image_editor/core/ImageHandler.kt b/image_editor_common/android/src/main/kotlin/com/fluttercandies/image_editor/core/ImageHandler.kt index 2c3807f..dbbc2e3 100644 --- a/image_editor_common/android/src/main/kotlin/com/fluttercandies/image_editor/core/ImageHandler.kt +++ b/image_editor_common/android/src/main/kotlin/com/fluttercandies/image_editor/core/ImageHandler.kt @@ -29,7 +29,7 @@ class ImageHandler(private var bitmap: Bitmap) { } private fun handleMixImage(option: MixImageOpt): Bitmap { - val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config) + val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config!!) val canvas = Canvas(newBitmap) canvas.drawBitmap(bitmap, 0F, 0F, null) val src = BitmapFactory.decodeByteArray(option.img, 0, option.img.count()) @@ -96,7 +96,7 @@ class ImageHandler(private var bitmap: Bitmap) { } private fun handleColor(option: ColorOption): Bitmap { - val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config) + val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config!!) val canvas = Canvas(newBitmap) val paint = Paint() paint.colorFilter = ColorMatrixColorFilter(option.matrix) @@ -105,7 +105,7 @@ class ImageHandler(private var bitmap: Bitmap) { } private fun handleText(option: AddTextOpt): Bitmap { - val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config) + val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config!!) val canvas = Canvas(newBitmap) val paint = Paint() canvas.drawBitmap(bitmap, 0F, 0F, paint) diff --git a/image_editor_common/example/android/build.gradle b/image_editor_common/example/android/build.gradle index 1743f09..e97e3f7 100644 --- a/image_editor_common/example/android/build.gradle +++ b/image_editor_common/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.8.21' repositories { google() mavenCentral() diff --git a/image_editor_common/example/android/gradle/wrapper/gradle-wrapper.properties b/image_editor_common/example/android/gradle/wrapper/gradle-wrapper.properties index cc5527d..9efa222 100644 --- a/image_editor_common/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/image_editor_common/example/android/gradle/wrapper/gradle-wrapper.properties @@ -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-7.4-all.zip +distributionUrl=https\://mirrors.tencent.com/gradle/gradle-7.4-all.zip diff --git a/image_editor_common/pubspec_overrides.yaml b/image_editor_common/pubspec_overrides.yaml deleted file mode 100644 index a9f0582..0000000 --- a/image_editor_common/pubspec_overrides.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# melos_managed_dependency_overrides: image_editor_platform_interface -dependency_overrides: - image_editor_platform_interface: - path: ../image_editor_platform_interface diff --git a/image_editor_ohos/pubspec_overrides.yaml b/image_editor_ohos/pubspec_overrides.yaml deleted file mode 100644 index a9f0582..0000000 --- a/image_editor_ohos/pubspec_overrides.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# melos_managed_dependency_overrides: image_editor_platform_interface -dependency_overrides: - image_editor_platform_interface: - path: ../image_editor_platform_interface