Skip to content

Commit a44e08e

Browse files
committed
Initial commit
0 parents  commit a44e08e

Some content is hidden

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

41 files changed

+1629
-0
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
dist

.gitignore

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# node files
2+
dist
3+
node_modules
4+
5+
# iOS files
6+
Pods
7+
Podfile.lock
8+
Build
9+
xcuserdata
10+
11+
# macOS files
12+
.DS_Store
13+
14+
15+
16+
# Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
17+
18+
# Built application files
19+
*.apk
20+
*.ap_
21+
22+
# Files for the ART/Dalvik VM
23+
*.dex
24+
25+
# Java class files
26+
*.class
27+
28+
# Generated files
29+
bin
30+
gen
31+
out
32+
33+
# Gradle files
34+
.gradle
35+
build
36+
37+
# Local configuration file (sdk path, etc)
38+
local.properties
39+
40+
# Proguard folder generated by Eclipse
41+
proguard
42+
43+
# Log Files
44+
*.log
45+
46+
# Android Studio Navigation editor temp files
47+
.navigation
48+
49+
# Android Studio captures folder
50+
captures
51+
52+
# IntelliJ
53+
*.iml
54+
.idea
55+
56+
# Keystore files
57+
# Uncomment the following line if you do not want to check your keystore files in.
58+
#*.jks
59+
60+
# External native build folder generated in Android Studio 2.2 and later
61+
.externalNativeBuild

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
dist

CONTRIBUTING.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributing
2+
3+
This guide provides instructions for contributing to this Capacitor plugin.
4+
5+
## Developing
6+
7+
### Local Setup
8+
9+
1. Fork and clone the repo.
10+
1. Install the dependencies.
11+
12+
```shell
13+
npm install
14+
```
15+
16+
1. Install SwiftLint if you're on macOS.
17+
18+
```shell
19+
brew install swiftlint
20+
```
21+
22+
### Scripts
23+
24+
#### `npm run build`
25+
26+
Build the plugin web assets and generate plugin API documentation using [`@capacitor/docgen`](https://github.com/ionic-team/capacitor-docgen).
27+
28+
It will compile the TypeScript code from `src/` into ESM JavaScript in `dist/esm/`. These files are used in apps with bundlers when your plugin is imported.
29+
30+
Then, Rollup will bundle the code into a single file at `dist/plugin.js`. This file is used in apps without bundlers by including it as a script in `index.html`.
31+
32+
#### `npm run verify`
33+
34+
Build and validate the web and native projects.
35+
36+
This is useful to run in CI to verify that the plugin builds for all platforms.
37+
38+
#### `npm run lint` / `npm run fmt`
39+
40+
Check formatting and code quality, autoformat/autofix if possible.
41+
42+
This template is integrated with ESLint, Prettier, and SwiftLint. Using these tools is completely optional, but the [Capacitor Community](https://github.com/capacitor-community/) strives to have consistent code style and structure for easier cooperation.
43+
44+
## Publishing
45+
46+
There is a `prepublishOnly` hook in `package.json` which prepares the plugin before publishing, so all you need to do is run:
47+
48+
```shell
49+
npm publish
50+
```
51+
52+
> **Note**: The [`files`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#files) array in `package.json` specifies which files get published. If you rename files/directories or add files elsewhere, you may need to update it.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require 'json'
2+
3+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4+
5+
Pod::Spec.new do |s|
6+
s.name = 'PantristCapacitorPluginMlKitTextRecognition'
7+
s.version = package['version']
8+
s.summary = package['description']
9+
s.license = package['license']
10+
s.homepage = package['repository']['url']
11+
s.author = package['author']
12+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13+
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14+
s.ios.deployment_target = '12.0'
15+
s.dependency 'Capacitor'
16+
s.swift_version = '5.1'
17+
end

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# @pantrist/capacitor-plugin-ml-kit-text-recognition
2+
3+
Capacitor Wrapper for TextRecognition of Gogoles ML-Kit
4+
5+
## Install
6+
7+
```bash
8+
npm install @pantrist/capacitor-plugin-ml-kit-text-recognition
9+
npx cap sync
10+
```
11+
12+
## API
13+
14+
<docgen-index></docgen-index>
15+
16+
<docgen-api>
17+
<!-- run docgen to generate docs from the source -->
18+
<!-- More info: https://github.com/ionic-team/capacitor-docgen -->
19+
</docgen-api>

android/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

android/build.gradle

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
ext {
2+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
3+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
4+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
5+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
6+
}
7+
8+
buildscript {
9+
repositories {
10+
google()
11+
jcenter()
12+
}
13+
dependencies {
14+
classpath 'com.android.tools.build:gradle:4.2.1'
15+
}
16+
}
17+
18+
apply plugin: 'com.android.library'
19+
20+
android {
21+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
22+
defaultConfig {
23+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
24+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30
25+
versionCode 1
26+
versionName "1.0"
27+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
28+
}
29+
buildTypes {
30+
release {
31+
minifyEnabled false
32+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
33+
}
34+
}
35+
lintOptions {
36+
abortOnError false
37+
}
38+
compileOptions {
39+
sourceCompatibility JavaVersion.VERSION_1_8
40+
targetCompatibility JavaVersion.VERSION_1_8
41+
}
42+
}
43+
44+
repositories {
45+
google()
46+
mavenCentral()
47+
jcenter()
48+
}
49+
50+
51+
dependencies {
52+
implementation fileTree(dir: 'libs', include: ['*.jar'])
53+
implementation project(':capacitor-android')
54+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
55+
testImplementation "junit:junit:$junitVersion"
56+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
57+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
58+
}

android/gradle.properties

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
org.gradle.jvmargs=-Xmx1536m
13+
14+
# When configured, Gradle will run in incubating parallel mode.
15+
# This option should only be used with decoupled projects. More details, visit
16+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17+
# org.gradle.parallel=true
18+
19+
# AndroidX package structure to make it clearer which packages are bundled with the
20+
# Android operating system, and which are packaged with your app's APK
21+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
22+
android.useAndroidX=true
23+
# Automatically convert third-party libraries to use AndroidX
24+
android.enableJetifier=true
57.8 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)