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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Jitpack package repository - ESCPOS-ThermalPrinter-Android v3.3.0](https://jitpack.io/v/DantSu/ESCPOS-ThermalPrinter-Android.svg)](https://jitpack.io/#DantSu/ESCPOS-ThermalPrinter-Android/3.3.0)
[![](https://jitpack.io/v/DantSu/ESCPOS-ThermalPrinter-Android/month.svg)](https://jitpack.io/#DantSu/ESCPOS-ThermalPrinter-Android/3.3.0)
[![](https://jitpack.io/v/DantSu/ESCPOS-ThermalPrinter-Android/week.svg)](https://jitpack.io/#DantSu/ESCPOS-ThermalPrinter-Android/3.3.0)
[![Jitpack package repository - ESCPOS-ThermalPrinter-Android v3.5.0](https://jitpack.io/v/DantSu/ESCPOS-ThermalPrinter-Android.svg)](https://jitpack.io/#DantSu/ESCPOS-ThermalPrinter-Android/3.5.0)
[![](https://jitpack.io/v/DantSu/ESCPOS-ThermalPrinter-Android/month.svg)](https://jitpack.io/#DantSu/ESCPOS-ThermalPrinter-Android/3.5.0)
[![](https://jitpack.io/v/DantSu/ESCPOS-ThermalPrinter-Android/week.svg)](https://jitpack.io/#DantSu/ESCPOS-ThermalPrinter-Android/3.5.0)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Android library for ESC/POS Thermal Printer
Expand Down Expand Up @@ -40,7 +40,7 @@ Useful library to help Android developers to print with (Bluetooth, TCP, USB) ES

## Android version

Developed for SDK version 16 (Android 4.1 Jelly Bean) and above.
Developed for SDK version 19 (Android 4.4 KitKat) and above.


## Tested printers
Expand All @@ -62,7 +62,7 @@ To test this library, it's pretty simple !

## Installation

**Step 1.** Add the [JitPack](https://jitpack.io/#DantSu/ESCPOS-ThermalPrinter-Android/3.3.0) repository to your build file. Add it in your root `/build.gradle` at the end of repositories:
**Step 1.** Add the [JitPack](https://jitpack.io/#DantSu/ESCPOS-ThermalPrinter-Android/3.5.0) repository to your build file. Add it in your root `/build.gradle` at the end of repositories:

```
allprojects {
Expand All @@ -78,7 +78,7 @@ allprojects {
```
dependencies {
...
implementation 'com.github.DantSu:ESCPOS-ThermalPrinter-Android:3.3.0'
implementation 'com.github.DantSu:ESCPOS-ThermalPrinter-Android:3.5.0'
}
```

Expand Down
17 changes: 9 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 33
namespace 'com.dantsu.thermalprinter'
compileSdkVersion 34
defaultConfig {
applicationId "com.dantsu.thermalprinter"
minSdkVersion 16
targetSdkVersion 33
minSdkVersion 19
targetSdkVersion 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
buildTypes {
release {
Expand All @@ -25,8 +26,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
implementation project(path: ':escposprinter')
}
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dantsu.thermalprinter">
xmlns:tools="http://schemas.android.com/tools">

<uses-feature android:name="android.hardware.usb.host" />

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:8.7.2'
}
}

Expand Down
29 changes: 19 additions & 10 deletions escposprinter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ plugins {
id 'maven-publish'
}

def libraryVersionCode = 3003000
def libraryVersionName = "3.3.0"
def libraryVersionName = "3.5.0"

android {
compileSdkVersion 33
namespace 'com.dantsu.escposprinter'
compileSdkVersion 34

defaultConfig {
minSdkVersion 16
targetSdkVersion 33
versionCode libraryVersionCode
versionName libraryVersionName
minSdkVersion 19
targetSdkVersion 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand All @@ -26,16 +24,21 @@ android {
}
}

publishing {
// Publishes "release" build component created by
// Android Gradle plugin
singleVariant("release")
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.zxing:core:3.4.0'
implementation 'com.google.zxing:core:3.5.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}


Expand All @@ -56,4 +59,10 @@ afterEvaluate {
}
}
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
2 changes: 1 addition & 1 deletion escposprinter/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dantsu.escposprinter" >
<manifest>
</manifest>
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

android.nonTransitiveRClass=false
android.nonFinalResIds=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 4 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Wed May 03 12:31:57 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading