-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add barcode scanner plugin (#536)
- Loading branch information
1 parent
eccd6f9
commit 454428c
Showing
84 changed files
with
2,992 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"barcode-scanner": major | ||
"barcode-scanner-js": major | ||
--- | ||
|
||
Initial release. |
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 |
---|---|---|
|
@@ -6,4 +6,5 @@ pnpm-lock.yaml | |
Cargo.lock | ||
.build | ||
build | ||
api-iife.js | ||
api-iife.js | ||
intermediates/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
12 changes: 1 addition & 11 deletions
12
examples/api/src-tauri/gen/android/app/src/main/res/values-night/themes.xml
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,16 +1,6 @@ | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
<!-- Base application theme. --> | ||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> | ||
<!-- Primary brand color. --> | ||
<item name="colorPrimary">@color/purple_200</item> | ||
<item name="colorPrimaryVariant">@color/purple_700</item> | ||
<item name="colorOnPrimary">@color/black</item> | ||
<!-- Secondary brand color. --> | ||
<item name="colorSecondary">@color/teal_200</item> | ||
<item name="colorSecondaryVariant">@color/teal_200</item> | ||
<item name="colorOnSecondary">@color/black</item> | ||
<!-- Status bar color. --> | ||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> | ||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
</style> | ||
</resources> |
12 changes: 1 addition & 11 deletions
12
examples/api/src-tauri/gen/android/app/src/main/res/values/themes.xml
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,16 +1,6 @@ | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
<!-- Base application theme. --> | ||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> | ||
<!-- Primary brand color. --> | ||
<item name="colorPrimary">@color/purple_500</item> | ||
<item name="colorPrimaryVariant">@color/purple_700</item> | ||
<item name="colorOnPrimary">@color/white</item> | ||
<!-- Secondary brand color. --> | ||
<item name="colorSecondary">@color/teal_200</item> | ||
<item name="colorSecondaryVariant">@color/teal_700</item> | ||
<item name="colorOnSecondary">@color/black</item> | ||
<!-- Status bar color. --> | ||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> | ||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
</style> | ||
</resources> |
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ open class BuildTask : DefaultTask() { | |
|
||
@TaskAction | ||
fun assemble() { | ||
val executable = """pnpm"""; | ||
val executable = """node"""; | ||
try { | ||
runTauriCli(executable) | ||
} catch (e: Exception) { | ||
|
@@ -32,7 +32,7 @@ open class BuildTask : DefaultTask() { | |
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null") | ||
val target = target ?: throw GradleException("target cannot be null") | ||
val release = release ?: throw GradleException("release cannot be null") | ||
val args = listOf("tauri", "android", "android-studio-script"); | ||
val args = listOf("/Users/lucas/projects/tauri/plugins-workspace/examples/api/./node_modules/.bin/../../../../node_modules/.pnpm/@[email protected]/node_modules/@tauri-apps/cli/tauri.js", "android", "android-studio-script"); | ||
|
||
project.exec { | ||
workingDir(File(project.projectDir, rootDirRel)) | ||
|
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 @@ | ||
xcuserdata/ | ||
build/ | ||
Externals/ |
Binary file added
BIN
+844 Bytes
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.15 KB
...i/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.15 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.54 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.39 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.43 KB
...i/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.43 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.49 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.15 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.02 KB
...i/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.02 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.69 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+152 KB
...s/api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.6 KB
...i/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.69 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.9 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.68 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.88 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.9 KB
...src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions
116
examples/api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/Contents.json
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,116 @@ | ||
{ | ||
"images": [ | ||
{ | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "83.5x83.5", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "1024x1024", | ||
"idiom": "ios-marketing", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
} | ||
], | ||
"info": { | ||
"version": 1, | ||
"author": "xcode" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/api/src-tauri/gen/apple/Assets.xcassets/Contents.json
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,6 @@ | ||
{ | ||
"info": { | ||
"version": 1, | ||
"author": "xcode" | ||
} | ||
} |
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,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>method</key> | ||
<string>development</string> | ||
</dict> | ||
</plist> |
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,21 @@ | ||
# Uncomment the next line to define a global platform for your project | ||
|
||
target 'api_iOS' do | ||
platform :ios, '13.0' | ||
# Pods for api_iOS | ||
end | ||
|
||
target 'api_macOS' do | ||
platform :osx, '11.0' | ||
# Pods for api_macOS | ||
end | ||
|
||
# Delete the deployment target for iOS and macOS, causing it to be inherited from the Podfile | ||
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
target.build_configurations.each do |config| | ||
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' | ||
config.build_settings.delete 'MACOSX_DEPLOYMENT_TARGET' | ||
end | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
examples/api/src-tauri/gen/apple/Sources/api/bindings/bindings.h
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,8 @@ | ||
#pragma once | ||
|
||
namespace ffi { | ||
extern "C" { | ||
void start_app(); | ||
} | ||
} | ||
|
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,6 @@ | ||
#include "bindings/bindings.h" | ||
|
||
int main(int argc, char * argv[]) { | ||
ffi::start_app(); | ||
return 0; | ||
} |
Oops, something went wrong.