Skip to content

Commit f67121b

Browse files
authored
update native SDK to 2.33.1, update example to latest RN
1 parent 7e3d4a3 commit f67121b

Some content is hidden

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

43 files changed

+3784
-3858
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 157 deletions
This file was deleted.

.github/workflows/linters.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

lefthook.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# EXAMPLE USAGE:
2+
#
3+
# Refer for explanation to following link:
4+
# https://lefthook.dev/configuration/
5+
#
6+
# pre-push:
7+
# jobs:
8+
# - name: packages audit
9+
# tags:
10+
# - frontend
11+
# - security
12+
# run: yarn audit
13+
#
14+
# - name: gems audit
15+
# tags:
16+
# - backend
17+
# - security
18+
# run: bundle audit
19+
#
20+
# pre-commit:
21+
# parallel: true
22+
# jobs:
23+
# - run: yarn eslint {staged_files}
24+
# glob: "*.{js,ts,jsx,tsx}"
25+
#
26+
# - name: rubocop
27+
# glob: "*.rb"
28+
# exclude:
29+
# - config/application.rb
30+
# - config/routes.rb
31+
# run: bundle exec rubocop --force-exclusion {all_files}
32+
#
33+
# - name: govet
34+
# files: git ls-files -m
35+
# glob: "*.go"
36+
# run: go vet {files}
37+
#
38+
# - script: "hello.js"
39+
# runner: node
40+
#
41+
# - script: "hello.go"
42+
# runner: go run

package/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ DerivedData
2828
*.ipa
2929
*.xcuserstate
3030
project.xcworkspace
31+
**/.xcode.env.local
3132

3233
# Android/IJ
3334
#

package/.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v20.19.0

package/android/build.gradle

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
buildscript {
2+
ext.getExtOrDefault = {name ->
3+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['EscPosPrinter_' + name]
4+
}
5+
26
repositories {
37
google()
48
mavenCentral()
59
}
610

711
dependencies {
8-
classpath "com.android.tools.build:gradle:7.2.1"
12+
classpath "com.android.tools.build:gradle:8.7.2"
913
}
1014
}
1115

@@ -24,33 +28,13 @@ if (isNewArchitectureEnabled()) {
2428
apply plugin: "com.facebook.react"
2529
}
2630

27-
def getExtOrDefault(name) {
28-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["EscPosPrinter_" + name]
29-
}
3031

3132
def getExtOrIntegerDefault(name) {
3233
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["EscPosPrinter_" + name]).toInteger()
3334
}
3435

35-
def supportsNamespace() {
36-
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
37-
def major = parsed[0].toInteger()
38-
def minor = parsed[1].toInteger()
39-
40-
// Namespace support was added in 7.3.0
41-
return (major == 7 && minor >= 3) || major >= 8
42-
}
43-
4436
android {
45-
if (supportsNamespace()) {
46-
namespace "com.escposprinter"
47-
48-
sourceSets {
49-
main {
50-
manifest.srcFile "src/main/AndroidManifestNew.xml"
51-
}
52-
}
53-
}
37+
namespace "com.escposprinter"
5438

5539
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
5640

@@ -96,18 +80,14 @@ repositories {
9680

9781

9882
dependencies {
99-
// For < 0.71, this will be from the local maven repo
100-
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
101-
//noinspection GradleDynamicVersion
102-
implementation fileTree(dir: "libs", include: ["*.jar"])
103-
implementation 'com.google.android.gms:play-services-location:21.0.1'
104-
implementation "com.facebook.react:react-native:+"
83+
implementation "com.facebook.react:react-android"
84+
implementation fileTree(dir: "libs", include: ["*.jar"])
85+
implementation 'com.google.android.gms:play-services-location:21.0.1'
10586
}
106-
10787
if (isNewArchitectureEnabled()) {
10888
react {
10989
jsRootDir = file("../src/")
110-
libraryName = "RNEspPosPrinterSpec"
90+
libraryName = "RNEscPosPrinterSpec"
11191
codegenJavaPackageName = "com.escposprinter"
11292
}
11393
}

package/android/gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
EscPosPrinter_kotlinVersion=1.7.0
2-
EscPosPrinter_minSdkVersion=21
3-
EscPosPrinter_targetSdkVersion=31
4-
EscPosPrinter_compileSdkVersion=31
5-
EscPosPrinter_ndkversion=21.4.7075529
1+
EscPosPrinter_kotlinVersion=2.0.21
2+
EscPosPrinter_minSdkVersion=24
3+
EscPosPrinter_targetSdkVersion=34
4+
EscPosPrinter_compileSdkVersion=35
5+
EscPosPrinter_ndkVersion=27.1.12297006
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.escposprinter">
3-
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
42
</manifest>

package/android/src/main/AndroidManifestNew.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)