-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
152 changed files
with
3,310 additions
and
6,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"flutterSdkVersion": "1.22.6", | ||
"flutterSdkVersion": "stable", | ||
"flavors": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
build/ | ||
|
||
# Android related | ||
**/android/**/gradle-wrapper.jar | ||
**/android/.gradle | ||
**/android/captures/ | ||
**/android/gradlew | ||
**/android/gradlew.bat | ||
**/android/local.properties | ||
**/android/**/GeneratedPluginRegistrant.java | ||
|
||
# iOS/XCode related | ||
**/ios/**/*.mode1v3 | ||
**/ios/**/*.mode2v3 | ||
**/ios/**/*.moved-aside | ||
**/ios/**/*.pbxuser | ||
**/ios/**/*.perspectivev3 | ||
**/ios/**/*sync/ | ||
**/ios/**/.sconsign.dblite | ||
**/ios/**/.tags* | ||
**/ios/**/.vagrant/ | ||
**/ios/**/DerivedData/ | ||
**/ios/**/Icon? | ||
**/ios/**/Pods/ | ||
**/ios/**/.symlinks/ | ||
**/ios/**/profile | ||
**/ios/**/xcuserdata | ||
**/ios/.generated/ | ||
**/ios/Flutter/App.framework | ||
**/ios/Flutter/Flutter.framework | ||
**/ios/Flutter/Flutter.podspec | ||
**/ios/Flutter/Generated.xcconfig | ||
**/ios/Flutter/app.flx | ||
**/ios/Flutter/app.zip | ||
**/ios/Flutter/flutter_assets/ | ||
**/ios/Flutter/flutter_export_environment.sh | ||
**/ios/ServiceDefinitions.json | ||
**/ios/Runner/GeneratedPluginRegistrant.* | ||
|
||
# Exceptions to above rules. | ||
!**/ios/**/default.mode1v3 | ||
!**/ios/**/default.mode2v3 | ||
!**/ios/**/default.pbxuser | ||
!**/ios/**/default.perspectivev3 | ||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"cmake.configureOnOpen": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,3 @@ | ||
# dart_native | ||
|
||
[![pub package](https://img.shields.io/pub/v/dart_native.svg)](https://pub.dev/packages/dart_native) | ||
[![Build Status](https://travis-ci.org/dart-native/dart_native.svg?branch=master)](https://travis-ci.org/dart-native/dart_native) | ||
|
||
|
||
## Description | ||
|
||
Write native code using Dart. This package liberates you from native code and low performance channel. | ||
|
||
## Requirements | ||
|
||
Flutter 1.20.2 (Dart 2.9.1) | ||
|
||
## Usage | ||
|
||
1. Generate Dart wrapper code using [@dartnative/codegen](https://www.npmjs.com/package/@dartnative/codegen) or write Dart code by yourself. | ||
|
||
2. Generate code for automatic type conversion using [dart_native_gen](https://pub.dev/packages/dart_native_gen) | ||
|
||
3. Enjoy it! | ||
|
||
## Installation | ||
|
||
Add packages to dependencies in your pubspec.yaml | ||
|
||
example: | ||
|
||
```yaml | ||
dependencies: | ||
dart_native: any | ||
``` | ||
[See this.](https://github.com/dart-native/dart_native/blob/master/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,42 @@ | ||
# Sets the minimum version of CMake required to build your native library. | ||
# This ensures that a certain set of CMake features is available to | ||
# your build. | ||
|
||
# Sets the minimum version of CMake required to build your native library. | ||
# This ensures that a certain set of CMake features is available to | ||
# your build. | ||
cmake_minimum_required(VERSION 3.4.1) | ||
|
||
# Specifies a library name, specifies whether the library is STATIC or | ||
# SHARED, and provides relative paths to the source code. You can | ||
# define multiple libraries by adding multiple add_library() commands, | ||
# and CMake builds them for you. When you build your app, Gradle | ||
# automatically packages shared libraries with your APK. | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../android/src/libs/${ANDROID_ABI}) | ||
|
||
# Specifies a library name, specifies whether the library is STATIC or | ||
# SHARED, and provides relative paths to the source code. You can | ||
# define multiple libraries by adding multiple add_library() commands, | ||
# and CMake builds them for you. When you build your app, Gradle | ||
# automatically packages shared libraries with your APK. | ||
add_library( # Specifies the name of the library. | ||
dart_native | ||
|
||
# Sets the library as a shared library. | ||
SHARED | ||
|
||
# Provides a relative path to your source file(s). | ||
src/main/jni/include/dart_api_dl.c | ||
src/main/jni/dart_native.cpp | ||
src/main/jni/dn_type_convert.cpp | ||
src/main/jni/dn_method_call.cpp | ||
src/main/jni/dn_signature_helper.cpp | ||
src/main/jni/dn_callback.cpp) | ||
|
||
find_library( # Sets the name of the path variable. | ||
log-lib | ||
|
||
# Specifies the name of the NDK library that | ||
# you want CMake to locate. | ||
log ) | ||
|
||
target_link_libraries( # Specifies the target library. | ||
dart_native | ||
|
||
# Links the target library to the log library | ||
# included in the NDK. | ||
${log-lib} ) | ||
|
||
include_directories(src/main/jni/include) | ||
dart_native | ||
|
||
# Sets the library as a shared library. | ||
SHARED | ||
|
||
# Provides a relative path to your source file(s). | ||
../ios/common/include/dart_api_dl.c | ||
src/main/jni/dart_native.cpp | ||
src/main/jni/dn_type_convert.cpp | ||
src/main/jni/dn_method_call.cpp | ||
src/main/jni/dn_signature_helper.cpp | ||
src/main/jni/dn_callback.cpp | ||
src/main/jni/dn_thread.cpp) | ||
|
||
find_library( # Sets the name of the path variable. | ||
log-lib | ||
|
||
# Specifies the name of the NDK library that | ||
# you want CMake to locate. | ||
log) | ||
|
||
target_link_libraries( # Specifies the target library. | ||
dart_native | ||
-landroid | ||
# Links the target library to the log library | ||
# included in the NDK. | ||
${log-lib}) | ||
|
||
include_directories(../ios/common/include) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.