Skip to content

Commit 3dc5835

Browse files
committed
Adding uuid.c example
1 parent 0f46696 commit 3dc5835

File tree

142 files changed

+5176
-0
lines changed

Some content is hidden

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

142 files changed

+5176
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
27+
**/doc/api/
28+
.dart_tool/
29+
build/
30+
31+
src/sqlite3.h
32+
src/sqlite3ext.h
33+
vendor/
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
8+
channel: "stable"
9+
10+
project_type: plugin_ffi
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
17+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
18+
- platform: android
19+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
20+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
21+
- platform: ios
22+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
23+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
24+
- platform: linux
25+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
26+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
27+
- platform: macos
28+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
29+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
30+
- platform: windows
31+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
32+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
33+
34+
# User provided section
35+
36+
# List of Local paths (relative to this file) that should be
37+
# ignored by the migrate tool.
38+
#
39+
# Files that are not part of the templates will be ignored by default.
40+
unmanaged_files:
41+
- 'lib/main.dart'
42+
- 'ios/Runner.xcodeproj/project.pbxproj'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.0.1
2+
3+
* TODO: Describe initial release.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO: Add your license here.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
vendor:
2+
mkdir -p vendor
3+
curl -o sqlite-amalgamation.zip https://www.sqlite.org/2024/sqlite-amalgamation-3450300.zip
4+
unzip sqlite-amalgamation.zip
5+
mv sqlite-amalgamation-3450300/* vendor/
6+
rmdir sqlite-amalgamation-3450300
7+
rm sqlite-amalgamation.zip
8+
9+
deps: sqlite3ext.h sqlite3.h
10+
11+
init: vendor deps
12+
13+
sqlite3ext.h: ./vendor/sqlite3ext.h
14+
cp $< $@
15+
mv sqlite3ext.h src/
16+
17+
sqlite3.h: ./vendor/sqlite3.h
18+
cp $< $@
19+
mv sqlite3.h src/
20+
21+
.PHONY: deps
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# uuid.c example
2+
3+
Custom SQLite extension (uuid.c) loaded in sqlite3.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
# Additional information about this file can be found at
4+
# https://dart.dev/guides/language/analysis-options
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.cxx
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// The Android Gradle Plugin builds the native code with the Android NDK.
2+
3+
group = "com.example.uuid"
4+
version = "1.0"
5+
6+
buildscript {
7+
repositories {
8+
google()
9+
mavenCentral()
10+
}
11+
12+
dependencies {
13+
// The Android Gradle Plugin knows how to build native code with the NDK.
14+
classpath("com.android.tools.build:gradle:7.3.0")
15+
}
16+
}
17+
18+
rootProject.allprojects {
19+
repositories {
20+
google()
21+
mavenCentral()
22+
}
23+
}
24+
25+
apply plugin: "com.android.library"
26+
27+
android {
28+
if (project.android.hasProperty("namespace")) {
29+
namespace = "com.example.uuid"
30+
}
31+
32+
// Bumping the plugin compileSdk version requires all clients of this plugin
33+
// to bump the version in their app.
34+
compileSdk = 34
35+
36+
// Use the NDK version
37+
// declared in /android/app/build.gradle file of the Flutter project.
38+
// Replace it with a version number if this plugin requires a specific NDK version.
39+
// (e.g. ndkVersion "23.1.7779620")
40+
ndkVersion = android.ndkVersion
41+
42+
// Invoke the shared CMake build with the Android Gradle Plugin.
43+
externalNativeBuild {
44+
cmake {
45+
path = "../src/CMakeLists.txt"
46+
47+
// The default CMake version for the Android Gradle Plugin is 3.10.2.
48+
// https://developer.android.com/studio/projects/install-ndk#vanilla_cmake
49+
//
50+
// The Flutter tooling requires that developers have CMake 3.10 or later
51+
// installed. You should not increase this version, as doing so will cause
52+
// the plugin to fail to compile for some customers of the plugin.
53+
// version "3.10.2"
54+
}
55+
}
56+
57+
compileOptions {
58+
sourceCompatibility = JavaVersion.VERSION_1_8
59+
targetCompatibility = JavaVersion.VERSION_1_8
60+
}
61+
62+
defaultConfig {
63+
minSdk = 21
64+
}
65+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'uuid'

0 commit comments

Comments
 (0)