react-native-printer-imin 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 iminsoftware
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 iminsoftware
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md CHANGED
@@ -1,36 +1,55 @@
1
- # react-native-printer-imin
2
-
3
- Native Module For iMin Printer SDK Plugin
4
-
5
- ## Installation
6
-
7
- ```sh
8
- npm install react-native-printer-imin
9
- ```
10
-
11
- ## Usage
12
-
13
- ```js
14
- import PrinterImin from 'react-native-printer-imin';
15
-
16
- // ...
17
- PrinterImin.initPrinter();
18
-
19
- PrinterImin.getPrinterStatus().then((info) => {
20
- console.log(info);
21
- });
22
-
23
- PrinterImin.printText('hello world');
24
- ```
25
-
26
- ## Contributing
27
-
28
- See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
29
-
30
- ## License
31
-
32
- MIT
33
-
34
- ---
35
-
36
- Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
1
+ # react-native-printer-imin
2
+
3
+ Native Module For iMin Printer SDK Plugin
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install react-native-printer-imin
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```js
14
+ import PrinterImin from 'react-native-printer-imin';
15
+
16
+ // ...
17
+ PrinterImin.initPrinter();
18
+
19
+ PrinterImin.getPrinterStatus().then((info) => {
20
+ console.log(info);
21
+ });
22
+
23
+ PrinterImin.printText('hello world');
24
+ ```
25
+
26
+ ## Contributing
27
+
28
+ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
29
+
30
+ ## License
31
+
32
+ MIT
33
+
34
+ ---
35
+
36
+ Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
37
+
38
+ # 更新版本号
39
+ # 编辑 package.json 文件,将 "version": "0.8.0" 更新为 "version": "0.9.0"
40
+
41
+ # 提交更改
42
+ git add .
43
+ git commit -m "Update to version 0.9.0"
44
+
45
+ # 使用 release-it 发布版本
46
+ npm run release
47
+
48
+ # 登录 npm(如果尚未登录)
49
+ npm login
50
+
51
+ # 发布到 npm
52
+ npm publish
53
+
54
+ # 验证发布
55
+ npm info react-native-printer-imin
@@ -1,112 +1,112 @@
1
- buildscript {
2
- repositories {
3
- google()
4
- mavenCentral()
5
- maven{
6
- allowInsecureProtocol = true
7
- url 'https://www.jitpack.io'
8
- }
9
- }
10
-
11
- dependencies {
12
- classpath "com.android.tools.build:gradle:7.2.1"
13
- }
14
- }
15
-
16
- def isNewArchitectureEnabled() {
17
- return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
18
- }
19
-
20
- apply plugin: "com.android.library"
21
-
22
- if (isNewArchitectureEnabled()) {
23
- apply plugin: "com.facebook.react"
24
- }
25
-
26
- def getExtOrDefault(name) {
27
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["PrinterImin_" + name]
28
- }
29
-
30
- def getExtOrIntegerDefault(name) {
31
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["PrinterImin_" + name]).toInteger()
32
- }
33
-
34
- def supportsNamespace() {
35
- def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
36
- def major = parsed[0].toInteger()
37
- def minor = parsed[1].toInteger()
38
-
39
- // Namespace support was added in 7.3.0
40
- return (major == 7 && minor >= 3) || major >= 8
41
- }
42
-
43
- android {
44
- if (supportsNamespace()) {
45
- namespace "com.printerimin"
46
-
47
- sourceSets {
48
- main {
49
- jniLibs.srcDirs = ['jniLibs']
50
- manifest.srcFile "src/main/AndroidManifestNew.xml"
51
- }
52
- }
53
- }
54
-
55
- compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
56
-
57
- defaultConfig {
58
- minSdkVersion getExtOrIntegerDefault("minSdkVersion")
59
- targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
60
- buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
61
- ndk {
62
- abiFilters "armeabi-v7a", "x86", "arm64-v8a"
63
- }
64
- }
65
-
66
- buildTypes {
67
- release {
68
- minifyEnabled false
69
- }
70
- }
71
-
72
- lintOptions {
73
- disable "GradleCompatible"
74
- }
75
-
76
- compileOptions {
77
- sourceCompatibility JavaVersion.VERSION_1_8
78
- targetCompatibility JavaVersion.VERSION_1_8
79
- }
80
- }
81
-
82
- repositories {
83
- mavenCentral()
84
- google()
85
- maven{
86
- allowInsecureProtocol = true
87
- url 'https://www.jitpack.io'
88
- }
89
- }
90
-
91
-
92
- dependencies {
93
- // For < 0.71, this will be from the local maven repo
94
- // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
95
- //noinspection GradleDynamicVersion
96
- implementation "com.facebook.react:react-native:+"
97
- implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
98
- // implementation files('libs/IminLibs1.0.15.jar')
99
- implementation files('libs/IminStraElectronicSDK_V1.2.jar')
100
- implementation files('libs/iminPrinterSDK-12_V1.2.0_2404031803.jar')
101
- implementation 'com.github.iminsoftware:IminPrinterLibrary:V1.0.0.14'
102
- implementation 'com.github.bumptech.glide:glide:4.16.0'
103
- annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
104
- }
105
-
106
- if (isNewArchitectureEnabled()) {
107
- react {
108
- jsRootDir = file("../src/")
109
- libraryName = "iminprinter"
110
- codegenJavaPackageName = "com.iminprinter"
111
- }
112
- }
1
+ buildscript {
2
+ repositories {
3
+ google()
4
+ mavenCentral()
5
+ maven{
6
+ allowInsecureProtocol = true
7
+ url 'https://www.jitpack.io'
8
+ }
9
+ }
10
+
11
+ dependencies {
12
+ classpath "com.android.tools.build:gradle:7.2.1"
13
+ }
14
+ }
15
+
16
+ def isNewArchitectureEnabled() {
17
+ return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
18
+ }
19
+
20
+ apply plugin: "com.android.library"
21
+
22
+ if (isNewArchitectureEnabled()) {
23
+ apply plugin: "com.facebook.react"
24
+ }
25
+
26
+ def getExtOrDefault(name) {
27
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["PrinterImin_" + name]
28
+ }
29
+
30
+ def getExtOrIntegerDefault(name) {
31
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["PrinterImin_" + name]).toInteger()
32
+ }
33
+
34
+ def supportsNamespace() {
35
+ def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
36
+ def major = parsed[0].toInteger()
37
+ def minor = parsed[1].toInteger()
38
+
39
+ // Namespace support was added in 7.3.0
40
+ return (major == 7 && minor >= 3) || major >= 8
41
+ }
42
+
43
+ android {
44
+ if (supportsNamespace()) {
45
+ namespace "com.printerimin"
46
+
47
+ sourceSets {
48
+ main {
49
+ jniLibs.srcDirs = ['jniLibs']
50
+ manifest.srcFile "src/main/AndroidManifestNew.xml"
51
+ }
52
+ }
53
+ }
54
+
55
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
56
+
57
+ defaultConfig {
58
+ minSdkVersion getExtOrIntegerDefault("minSdkVersion")
59
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
60
+ buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
61
+ ndk {
62
+ abiFilters "armeabi-v7a", "x86", "arm64-v8a"
63
+ }
64
+ }
65
+
66
+ buildTypes {
67
+ release {
68
+ minifyEnabled false
69
+ }
70
+ }
71
+
72
+ lintOptions {
73
+ disable "GradleCompatible"
74
+ }
75
+
76
+ compileOptions {
77
+ sourceCompatibility JavaVersion.VERSION_1_8
78
+ targetCompatibility JavaVersion.VERSION_1_8
79
+ }
80
+ }
81
+
82
+ repositories {
83
+ mavenCentral()
84
+ google()
85
+ maven{
86
+ allowInsecureProtocol = true
87
+ url 'https://www.jitpack.io'
88
+ }
89
+ }
90
+
91
+
92
+ dependencies {
93
+ // For < 0.71, this will be from the local maven repo
94
+ // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
95
+ //noinspection GradleDynamicVersion
96
+ implementation "com.facebook.react:react-native:+"
97
+ implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
98
+ // implementation files('libs/IminLibs1.0.15.jar')
99
+ implementation files('libs/IminStraElectronicSDK_V1.2.jar')
100
+ implementation files('libs/iminPrinterSDK-15_V1.3.2_2411051634.jar')
101
+ implementation 'com.github.iminsoftware:IminPrinterLibrary:V1.0.0.15'
102
+ implementation 'com.github.bumptech.glide:glide:4.16.0'
103
+ annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
104
+ }
105
+
106
+ if (isNewArchitectureEnabled()) {
107
+ react {
108
+ jsRootDir = file("../src/")
109
+ libraryName = "iminprinter"
110
+ codegenJavaPackageName = "com.iminprinter"
111
+ }
112
+ }
@@ -1,5 +1,5 @@
1
- PrinterImin_kotlinVersion=1.7.0
2
- PrinterImin_minSdkVersion=21
3
- PrinterImin_targetSdkVersion=31
4
- PrinterImin_compileSdkVersion=31
5
- PrinterImin_ndkversion=21.4.7075529
1
+ PrinterImin_kotlinVersion=1.7.0
2
+ PrinterImin_minSdkVersion=21
3
+ PrinterImin_targetSdkVersion=31
4
+ PrinterImin_compileSdkVersion=31
5
+ PrinterImin_ndkversion=21.4.7075529
@@ -1,3 +1,3 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.printerimin">
3
- </manifest>
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="com.printerimin">
3
+ </manifest>
@@ -1,2 +1,2 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
- </manifest>
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ </manifest>