Skip to content

Commit 6241bc3

Browse files
authored
chore: change example and melos config (#142)
* chore: change example and melos config Signed-off-by: Caijinglong <[email protected]> * chore: downgrade version Signed-off-by: Caijinglong <[email protected]> * chroe: CI - update runnable jdk version Signed-off-by: Caijinglong <[email protected]> * chore: fix example error for ios Signed-off-by: Caijinglong <[email protected]> --------- Signed-off-by: Caijinglong <[email protected]>
1 parent 17ff0e4 commit 6241bc3

File tree

129 files changed

+188
-5077
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+188
-5077
lines changed

.github/workflows/runnable.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@v4
44+
- uses: actions/setup-java@v4
45+
with:
46+
distribution: "corretto"
47+
java-version: "17"
4448
- uses: subosito/flutter-action@v2
4549
with:
4650
channel: "stable"

image_editor/example/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ app.*.symbols
3939

4040
# Obfuscation related
4141
app.*.map.json
42+
4243
!pubspec.lock

image_editor/example/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
# flutter_image_editor_example
22

3-
A demo for flutter_image_editor.
3+
Demonstrates how to use the flutter_image_editor plugin.
44

5-
Run example of open harmony in the [directory][example-for-harmony]
5+
## Getting Started
66

7-
[example-for-harmony]: ../../image_editor_ohos/example/
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13+
14+
For help getting started with Flutter, view our
15+
[online documentation](https://flutter.dev/docs), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.

image_editor/example/android/app/build.gradle

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def localProperties = new Properties()
28
def localPropertiesFile = rootProject.file('local.properties')
39
if (localPropertiesFile.exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
612
}
713
}
814

9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
1415
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1516
if (flutterVersionCode == null) {
1617
flutterVersionCode = '1'
@@ -21,12 +22,13 @@ if (flutterVersionName == null) {
2122
flutterVersionName = '1.0'
2223
}
2324

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2825
android {
29-
compileSdkVersion flutter.compileSdkVersion
26+
def sdkVersion = 35
27+
if (project.hasProperty('compileSdk')) {
28+
compileSdk = sdkVersion
29+
} else {
30+
compileSdkVersion = sdkVersion
31+
}
3032

3133
sourceSets {
3234
main.java.srcDirs += 'src/main/kotlin'
@@ -53,12 +55,20 @@ android {
5355
signingConfig signingConfigs.debug
5456
}
5557
}
58+
59+
if (project.android.hasProperty('namespace')) {
60+
namespace 'com.fluttercandies.image_editor'
61+
}
62+
63+
kotlinOptions {
64+
jvmTarget = '1.8'
65+
}
66+
5667
}
5768

5869
flutter {
5970
source '../..'
6071
}
6172

6273
dependencies {
63-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
6474
}

image_editor/example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.fluttercandies.flutter_image_editor_example">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<uses-permission android:name="android.permission.INTERNET"/>
43
<application
54
android:icon="@mipmap/ic_launcher"

image_editor/example/android/build.gradle

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
buildscript {
2-
ext.kotlin_version = '1.8.10'
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.7.2'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
29

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
818

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version '8.7.2' apply false
22+
id "org.jetbrains.kotlin.android" version '1.8.22' apply false
23+
}
24+
25+
include ":app"

image_editor/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>12.0</string>
24+
<string>9.0</string>
2525
</dict>
2626
</plist>

image_editor/example/ios/Podfile

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,11 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
2727

2828
flutter_ios_podfile_setup
2929

30-
def install_plugin_pods(application_path = nil, relative_symlink_dir, platform)
31-
# defined_in_file is set by CocoaPods and is a Pathname to the Podfile.
32-
application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)
33-
raise 'Could not find application path' unless application_path
34-
35-
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
36-
# referring to absolute paths on developers' machines.
37-
38-
symlink_dir = File.expand_path(relative_symlink_dir, application_path)
39-
system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils.
40-
41-
symlink_plugins_dir = File.expand_path('plugins', symlink_dir)
42-
system('mkdir', '-p', symlink_plugins_dir)
43-
44-
plugins_file = File.join(application_path, '..', '.flutter-plugins-dependencies')
45-
plugin_pods = flutter_parse_plugins_file(plugins_file, platform)
46-
plugin_pods.each do |plugin_hash|
47-
plugin_name = plugin_hash['name']
48-
plugin_path = plugin_hash['path']
49-
# iOS and macOS code can be shared in "darwin" directory, otherwise
50-
# respectively in "ios" or "macos" directories.
51-
shared_darwin_source = plugin_hash.fetch('shared_darwin_source', false)
52-
platform_directory = shared_darwin_source ? 'darwin' : platform
53-
if (plugin_name && plugin_path)
54-
specPath = "#{plugin_path}/#{platform_directory}/#{plugin_name}.podspec"
55-
pod plugin_name, :path => specPath
56-
end
57-
end
58-
end
59-
6030
target 'Runner' do
6131
use_frameworks!
6232
use_modular_headers!
6333

64-
flutter_install_ios_engine_pod(File.dirname(File.realpath(__FILE__)))
65-
install_plugin_pods(File.dirname(File.realpath(__FILE__)), '.symlinks', 'ios')
34+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
6635
end
6736

6837
post_install do |installer|

image_editor/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 54;
6+
objectVersion = 50;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -146,7 +146,7 @@
146146
97C146EC1CF9000F007C117D /* Resources */,
147147
9705A1C41CF9048500538489 /* Embed Frameworks */,
148148
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
149-
A26971BBAB1B41EA1D99CAF0 /* [CP] Embed Pods Frameworks */,
149+
D1337B04A10CD6FD98489BBF /* [CP] Embed Pods Frameworks */,
150150
);
151151
buildRules = (
152152
);
@@ -163,7 +163,7 @@
163163
97C146E61CF9000F007C117D /* Project object */ = {
164164
isa = PBXProject;
165165
attributes = {
166-
LastUpgradeCheck = 1510;
166+
LastUpgradeCheck = 1300;
167167
ORGANIZATIONNAME = "The Chromium Authors";
168168
TargetAttributes = {
169169
97C146ED1CF9000F007C117D = {
@@ -208,12 +208,10 @@
208208
/* Begin PBXShellScriptBuildPhase section */
209209
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
210210
isa = PBXShellScriptBuildPhase;
211-
alwaysOutOfDate = 1;
212211
buildActionMask = 2147483647;
213212
files = (
214213
);
215214
inputPaths = (
216-
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
217215
);
218216
name = "Thin Binary";
219217
outputPaths = (
@@ -246,7 +244,6 @@
246244
};
247245
9740EEB61CF901F6004384FC /* Run Script */ = {
248246
isa = PBXShellScriptBuildPhase;
249-
alwaysOutOfDate = 1;
250247
buildActionMask = 2147483647;
251248
files = (
252249
);
@@ -259,7 +256,7 @@
259256
shellPath = /bin/sh;
260257
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
261258
};
262-
A26971BBAB1B41EA1D99CAF0 /* [CP] Embed Pods Frameworks */ = {
259+
D1337B04A10CD6FD98489BBF /* [CP] Embed Pods Frameworks */ = {
263260
isa = PBXShellScriptBuildPhase;
264261
buildActionMask = 2147483647;
265262
files = (
@@ -356,7 +353,7 @@
356353
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
357354
GCC_WARN_UNUSED_FUNCTION = YES;
358355
GCC_WARN_UNUSED_VARIABLE = YES;
359-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
356+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
360357
MTL_ENABLE_DEBUG_INFO = NO;
361358
SDKROOT = iphoneos;
362359
SUPPORTED_PLATFORMS = iphoneos;
@@ -442,7 +439,7 @@
442439
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
443440
GCC_WARN_UNUSED_FUNCTION = YES;
444441
GCC_WARN_UNUSED_VARIABLE = YES;
445-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
442+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
446443
MTL_ENABLE_DEBUG_INFO = YES;
447444
ONLY_ACTIVE_ARCH = YES;
448445
SDKROOT = iphoneos;
@@ -491,7 +488,7 @@
491488
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
492489
GCC_WARN_UNUSED_FUNCTION = YES;
493490
GCC_WARN_UNUSED_VARIABLE = YES;
494-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
491+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
495492
MTL_ENABLE_DEBUG_INFO = NO;
496493
SDKROOT = iphoneos;
497494
SUPPORTED_PLATFORMS = iphoneos;

0 commit comments

Comments
 (0)