Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
}

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {


}


if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
1 change: 1 addition & 0 deletions android/app/src/main/assets/capacitor.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions android/app/src/main/assets/capacitor.plugins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Empty file.
Empty file.
Binary file added android/app/src/main/assets/public/index.html
Binary file not shown.
6 changes: 6 additions & 0 deletions android/app/src/main/res/xml/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<access origin="*" />


</widget>
59 changes: 59 additions & 0 deletions android/capacitor-cordova-android-plugins/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
ext {
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
cordovaAndroidVersion = project.hasProperty('cordovaAndroidVersion') ? rootProject.ext.cordovaAndroidVersion : '10.1.1'
}

buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.2'
}
}

apply plugin: 'com.android.library'

android {
namespace "capacitor.cordova.android.plugins"
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
}

repositories {
google()
mavenCentral()
flatDir{
dirs 'src/main/libs', 'libs'
}
}

dependencies {
implementation fileTree(dir: 'src/main/libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "org.apache.cordova:framework:$cordovaAndroidVersion"
// SUB-PROJECT DEPENDENCIES START

// SUB-PROJECT DEPENDENCIES END
}

// PLUGIN GRADLE EXTENSIONS START
apply from: "cordova.variables.gradle"
// PLUGIN GRADLE EXTENSIONS END

for (def func : cdvPluginPostBuildExtras) {
func()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
ext {
cdvMinSdkVersion = project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
// Plugin gradle extensions can append to this to have code run at the end.
cdvPluginPostBuildExtras = []
cordovaConfig = [:]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:amazon="http://schemas.amazon.com/apk/res/android">
<application >

</application>

</manifest>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
28 changes: 23 additions & 5 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "capacitor-document-scanner-demo",
"version": "1.0.0",
"description": "A demo showing how to use Capacitor Document Scanner",
"description": "A demo showing how to use Capacitor Document Scanner(Updated to capacitor 7.2.0)",
"main": "index.js",
"keywords": [
"capacitor",
Expand All @@ -12,20 +12,38 @@
"build": "tsc && rollup -c rollup.config.mjs"
},
"dependencies": {
"@capacitor/android": "^5.0.0",
"@capacitor/android": "^7.2.0",
"@capacitor/camera": "latest",
"@capacitor/core": "latest",
"@capacitor/ios": "^5.0.0",
"@capacitor/ios": "^7.2.0",
"@capacitor/splash-screen": "latest",
"capacitor-document-scanner": "file:.."
"capacitor-document-scanner": "file:..",
"@capacitor/cli": "^7.2.0",
"eslint": "^9.28.0",
"prettier": "^3.5.3",
"rimraf": "^6.0.1",
"rollup": "^4.41.1",
"typescript": "^5.8.3"
},
"devDependencies": {
"@capacitor/cli": "latest",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-typescript": "^11.1.1",
"rollup": "^3.23.0",
"tslib": "^2.5.2",
"typescript": "^5.0.4"
"@capacitor/android": "^6.0.0",
"@capacitor/core": "^7.2.0",
"@capacitor/docgen": "^0.0.18",
"@capacitor/ios": "^6.0.0",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
"eslint": "^9.28.0",
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.2",
"swiftlint": "^1.0.1",
"typescript": "^5.8.3"
},
"author": "David Marcus",
"license": "MIT"
Expand Down
23 changes: 18 additions & 5 deletions example/www/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ const createCapacitor$1 = (win) => {
const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {
const registeredPlugin = registeredPlugins.get(pluginName);
if (registeredPlugin) {
console.warn(`Capacitor plugin "${pluginName}" already registered. Cannot register plugins twice.`);
console.warn(`Capacitor plugin "${pluginName}"
already registered.
Cannot register plugins twice.`
);
return registeredPlugin.proxy;
}
const platform = getPlatform();
Expand Down Expand Up @@ -289,7 +292,9 @@ let WebPlugin$1 = class WebPlugin {
this.windowListeners = {};
if (config) {
// TODO: add link to upgrade guide
console.warn(`Capacitor WebPlugin "${config.name}" config object was deprecated in v3 and will be removed in v4.`);
console.warn(`Capacitor WebPlugin "${config.name}"
config object was deprecated in
v3 and will be removed in v4.`);
this.config = config;
}
}
Expand Down Expand Up @@ -764,7 +769,11 @@ const createCapacitor = (win) => {
const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {
const registeredPlugin = registeredPlugins.get(pluginName);
if (registeredPlugin) {
console.warn(`Capacitor plugin "${pluginName}" already registered. Cannot register plugins twice.`);
console.warn(`Capacitor plugin "${pluginName}"
already registered.
Cannot register plugins twice.`
);

return registeredPlugin.proxy;
}
const platform = getPlatform();
Expand Down Expand Up @@ -830,7 +839,7 @@ const createCapacitor = (win) => {
return p;
};
// Some flair ✨
wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;
wrapper.toString = () => `${prop.toString()}() {[capacitor code]}`;
Object.defineProperty(wrapper, 'name', {
value: prop,
writable: false,
Expand Down Expand Up @@ -931,7 +940,11 @@ class WebPlugin {
this.windowListeners = {};
if (config) {
// TODO: add link to upgrade guide
console.warn(`Capacitor WebPlugin "${config.name}" config object was deprecated in v3 and will be removed in v4.`);
console.warn(`Capacitor WebPlugin "${config.name}"
config object was deprecated
in v3 and will be removed in v4.`
);

this.config = config;
}
}
Expand Down
3 changes: 3 additions & 0 deletions ios/App/App/capacitor.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packageClassList": []
}
6 changes: 6 additions & 0 deletions ios/App/App/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<access origin="*" />


</widget>
Empty file added ios/App/App/public/cordova.js
Empty file.
Empty file.
Binary file added ios/App/App/public/index.html
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/Plugin/Info.plist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//DE" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
Expand Down
16 changes: 16 additions & 0 deletions ios/capacitor-cordova-ios-plugins/CordovaPlugins.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Pod::Spec.new do |s|
s.name = 'CordovaPlugins'
s.version = '7.2.0'
s.summary = 'Autogenerated spec'
s.license = 'Unknown'
s.homepage = 'https://example.com'
s.authors = { 'Capacitor Generator' => '[email protected]' }
s.source = { :git => 'https://github.com/ionic-team/does-not-exist.git', :tag => '7.2.0' }
s.source_files = 'sources/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '14.0'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1 WK_WEB_VIEW_ONLY=1' }
s.dependency 'CapacitorCordova'
s.swift_version = '5.1'

end
10 changes: 10 additions & 0 deletions ios/capacitor-cordova-ios-plugins/CordovaPluginsResources.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Pod::Spec.new do |s|
s.name = 'CordovaPluginsResources'
s.version = '0.0.105'
s.summary = 'Resources for Cordova plugins'
s.license = 'MIT'
s.homepage = 'https://capacitorjs.com/'
s.authors = { 'Ionic Team' => '[email protected]' }
s.source = { :git => 'https://github.com/ionic-team/capacitor.git', :tag => s.version.to_s }
s.resources = ['resources/*']
end
16 changes: 16 additions & 0 deletions ios/capacitor-cordova-ios-plugins/CordovaPluginsStatic.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Pod::Spec.new do |s|
s.name = 'CordovaPluginsStatic'
s.version = '7.2.0'
s.summary = 'Autogenerated spec'
s.license = 'Unknown'
s.homepage = 'https://example.com'
s.authors = { 'Capacitor Generator' => '[email protected]' }
s.source = { :git => 'https://github.com/ionic-team/does-not-exist.git', :tag => '7.2.0' }
s.source_files = 'sourcesstatic/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '14.0'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1 WK_WEB_VIEW_ONLY=1' }
s.dependency 'CapacitorCordova'
s.swift_version = '5.1'
s.static_framework = true
end
1 change: 1 addition & 0 deletions ios/capacitor-cordova-ios-plugins/resources/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions ios/capacitor-cordova-ios-plugins/sources/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading