Skip to content

Commit a73da6b

Browse files
committed
Merge branch 'release/0.3.6'
2 parents bea8f9c + cd3bfe7 commit a73da6b

Some content is hidden

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

68 files changed

+1049
-152
lines changed

dart_native/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.3.6
2+
3+
* [Fix] Issue: https://github.com/dart-native/dart_native/issues/24
14
## 0.3.5
25

36
* [Feature] Object lifecycle management for Android.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dart_native/example/android/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ allprojects {
1313
repositories {
1414
google()
1515
jcenter()
16+
maven { url "https://storage.googleapis.com/download.flutter.io" }
1617
}
1718
}
1819

dart_native/example/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
2727

2828
flutter_ios_podfile_setup
2929

30-
use_frameworks!
30+
#use_frameworks!
3131

3232
target 'Runner' do
3333
pod 'CocoaLumberjack'

dart_native/example/ios/Podfile.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ EXTERNAL SOURCES:
2323

2424
SPEC CHECKSUMS:
2525
CocoaLumberjack: bd155f2dd06c0e0b03f876f7a3ee55693122ec94
26-
dart_native: 06e03bcdb1fcf6cbc1046e2ab1642b29e4ae994b
26+
dart_native: 8150ab93e4e060c19e0e8fb3bf98bc970d097957
2727
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
2828

29-
PODFILE CHECKSUM: 11983212d18b193f963d2e21b6c3632cd12be557
29+
PODFILE CHECKSUM: f10e42e188a012076f9d5e111f499229a501832a
3030

31-
COCOAPODS: 1.9.3
31+
COCOAPODS: 1.10.0

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

+6-8
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12-
424D3FC17E6610BB7E6628EC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 132372D77775B10BB0FB4E81 /* Pods_Runner.framework */; };
1312
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
1413
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
1514
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1615
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1716
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
1817
A41207A1242B949F001B3E1C /* RuntimeSon.m in Sources */ = {isa = PBXBuildFile; fileRef = A41207A0242B949F001B3E1C /* RuntimeSon.m */; };
1918
A462C31623C83CEB00068880 /* RuntimeStub.m in Sources */ = {isa = PBXBuildFile; fileRef = A462C31523C83CEA00068880 /* RuntimeStub.m */; };
19+
A99EDC3FB62BC44FF3AF35C3 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0146B48A4BA9D6861E0085B8 /* libPods-Runner.a */; };
2020
/* End PBXBuildFile section */
2121

2222
/* Begin PBXCopyFilesBuildPhase section */
@@ -33,7 +33,7 @@
3333
/* End PBXCopyFilesBuildPhase section */
3434

3535
/* Begin PBXFileReference section */
36-
132372D77775B10BB0FB4E81 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
36+
0146B48A4BA9D6861E0085B8 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3737
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3838
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3939
2A4AF18FDF40A3D2129339D3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
@@ -62,7 +62,7 @@
6262
isa = PBXFrameworksBuildPhase;
6363
buildActionMask = 2147483647;
6464
files = (
65-
424D3FC17E6610BB7E6628EC /* Pods_Runner.framework in Frameworks */,
65+
A99EDC3FB62BC44FF3AF35C3 /* libPods-Runner.a in Frameworks */,
6666
);
6767
runOnlyForDeploymentPostprocessing = 0;
6868
};
@@ -72,7 +72,7 @@
7272
4C2E40D2EBC79D4E31BCF1AA /* Frameworks */ = {
7373
isa = PBXGroup;
7474
children = (
75-
132372D77775B10BB0FB4E81 /* Pods_Runner.framework */,
75+
0146B48A4BA9D6861E0085B8 /* libPods-Runner.a */,
7676
);
7777
name = Frameworks;
7878
sourceTree = "<group>";
@@ -275,15 +275,13 @@
275275
);
276276
inputPaths = (
277277
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
278-
"${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework",
279278
"${PODS_ROOT}/../Flutter/Flutter.framework",
280-
"${BUILT_PRODUCTS_DIR}/dart_native/dart_native.framework",
279+
"${PODS_ROOT}/../.symlinks/plugins/dart_native/ios/DartNative.framework",
281280
);
282281
name = "[CP] Embed Pods Frameworks";
283282
outputPaths = (
284-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework",
285283
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
286-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/dart_native.framework",
284+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DartNative.framework",
287285
);
288286
runOnlyForDeploymentPostprocessing = 0;
289287
shellPath = /bin/sh;

dart_native/example/lib/android/unit_test.dart

+47-11
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,71 @@ import 'package:dart_native_example/android/runtimestub.dart';
33
import 'package:dart_native_example/android/entity.dart';
44

55
testAndroid(RuntimeStub stub) {
6+
int ms = currentTimeMillis();
67
double resultDouble = stub.getDouble(10.0);
7-
print('getDouble result:$resultDouble');
8+
int use = currentTimeMillis() - ms;
9+
print('getDouble result:$resultDouble , cost:$use');
810

11+
ms = currentTimeMillis();
912
String resultChar = stub.getChar('a');
10-
print('getChar result:$resultChar');
13+
use = currentTimeMillis() - ms;
14+
print('getChar result:$resultChar , cost:$use');
1115

16+
ms = currentTimeMillis();
1217
int resultInt = stub.getInt(10);
13-
print('getInt result:$resultInt');
18+
use = currentTimeMillis() - ms;
19+
print('getInt result:$resultInt , cost:$use');
1420

21+
ms = currentTimeMillis();
1522
bool resultBool = stub.getBool(true);
16-
print('getBool result:$resultBool');
23+
use = currentTimeMillis() - ms;
24+
print('getBool result:$resultBool , cost:$use');
1725

26+
ms = currentTimeMillis();
1827
double resultFloat = stub.getFloat(10.5);
19-
print('getFloat result:$resultFloat');
28+
use = currentTimeMillis() - ms;
29+
print('getFloat result:$resultFloat , cost:$use');
2030

31+
ms = currentTimeMillis();
2132
int resultByte = stub.getByte(1);
22-
print('getByte result:$resultByte');
33+
use = currentTimeMillis() - ms;
34+
print('getByte result:$resultByte , cost:$use');
2335

36+
ms = currentTimeMillis();
2437
int resultShort = stub.getShort(1);
25-
print('getShort result:$resultShort');
38+
use = currentTimeMillis() - ms;
39+
print('getShort result:$resultShort , cost:$use');
2640

41+
ms = currentTimeMillis();
2742
int resultLong = stub.getLong(100);
28-
print('getLong result:$resultLong');
43+
use = currentTimeMillis() - ms;
44+
print('getLong result:$resultLong , cost:$use');
2945

46+
ms = currentTimeMillis();
3047
String resultString = stub.getString("test is success?");
31-
print('getString result:$resultString');
48+
use = currentTimeMillis() - ms;
49+
print('getString result:$resultString, cost:$use');
3250

51+
ms = currentTimeMillis();
3352
int resultAdd = stub.add(10, 20);
34-
print('add result:$resultAdd');
53+
use = currentTimeMillis() - ms;
54+
print('add result:$resultAdd, cost:$use');
3555

56+
ms = currentTimeMillis();
3657
stub.log("testlog", "log test");
58+
use = currentTimeMillis() - ms;
59+
print('testlog, cost:$use');
3760

38-
bool resultCall = stub.complexCall("test", 10, 'a', 10.0, 12.0, 1, 2, 10000, false);
61+
bool resultCall = stub.complexCall(
62+
"test",
63+
10,
64+
'a',
65+
10.0,
66+
12.0,
67+
1,
68+
2,
69+
10000,
70+
false);
3971
print('call result:$resultCall');
4072

4173
Entity entity = stub.createEntity();
@@ -46,3 +78,7 @@ testAndroid(RuntimeStub stub) {
4678

4779
stub.setDelegateListener(DelegateStub());
4880
}
81+
82+
int currentTimeMillis() {
83+
return new DateTime.now().millisecondsSinceEpoch;
84+
}

0 commit comments

Comments
 (0)