Skip to content
Merged
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
10 changes: 5 additions & 5 deletions .github/workflows/check-badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: Check badges in README.md

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Check badges in README.md
run: ./scripts/check-badges.bash "README.md"
- name: Check badges in README.md
run: ./scripts/check-badges.bash "README.md"
18 changes: 9 additions & 9 deletions .github/workflows/check-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: Java check style

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 11
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: 11

- name: Lint with CheckStyle
run: ./scripts/checkstyle.bash
- name: Lint with CheckStyle
run: ./scripts/checkstyle.bash
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Java CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
name: test with Java version ${{ matrix.java-version }}
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [11, 21]

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
# Use same in Dockerfile
distribution: "corretto"
java-version: ${{ matrix.java-version }}
cache: "maven"

- name: Maven Compile
run: mvn compile

- name: Test with Maven
env:
TEST_CONFIGURATION_ACCESS_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }}
run: |
chmod +x scripts/*
make build
make test

android-test:
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build Java library JAR
run: mvn package -Dmaven.test.skip=true

- name: Accept Android SDK Licenses
run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Cache AVD
uses: actions/cache@v4
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-pixel2-api30-atd

- name: Run Android Tests
working-directory: android-test
run: >
./gradlew pixel2api30DebugAndroidTest
-Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect
40 changes: 0 additions & 40 deletions .github/workflows/maven.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
build
aspose-barcode-cloud.iml
!tools/*
!**/gradle-wrapper.jar
.idea
.gradle
local.properties

**/configuration*.json
snippets_test/
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ build:
.PHONY: test
test:
mvn test
mvn dependency:copy-dependencies -DoutputDirectory=target/lib/
./scripts/run_snippets.sh

.PHONY: display-updates
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Aspose.BarCode Cloud SDK for Java

[![License](https://img.shields.io/github/license/aspose-barcode-cloud/aspose-barcode-cloud-java)](LICENSE)
[![Java CI with Maven](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/actions/workflows/maven.yml/badge.svg?branch=main)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/actions/workflows/maven.yml)
[![Java CI with Maven](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/actions/workflows/ci.yml)
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Freleases.aspose.cloud%2Fjava%2Frepo%2Fcom%2Faspose%2Faspose-barcode-cloud%2Fmaven-metadata.xml)](https://releases.aspose.cloud/java/repo/com/aspose/aspose-barcode-cloud/)

- API version: 4.0
Expand Down
58 changes: 58 additions & 0 deletions android-test/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
plugins {
id 'com.android.library' version '9.1.0'
}

android {
namespace 'com.aspose.barcode.cloud.androidtest'
compileSdk 35

defaultConfig {
minSdk 23
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

sourceSets {
androidTest {
java {
srcDirs = ['../src/test/java']
exclude 'com/aspose/barcode/cloud/test/**'
exclude 'com/aspose/barcode/cloud/examples/**'
}
}
}

testOptions {
managedDevices {
localDevices {
pixel2api30 {
device = "Pixel 2"
apiLevel = 30
systemImageSource = "aosp-atd"
}
}
}
}
}

dependencies {
implementation fileTree(
dir: '../target',
include: ['aspose-barcode-cloud-*.jar'],
exclude: [
'aspose-barcode-cloud-*-sources.jar',
'aspose-barcode-cloud-*-javadoc.jar'
]
)
implementation 'com.google.code.gson:gson:2.13.2'
implementation 'io.gsonfire:gson-fire:1.9.0'
implementation 'com.squareup.okhttp3:okhttp:5.3.2'
implementation 'io.swagger:swagger-annotations:1.6.16'
androidTestImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
}
Binary file added android-test/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions android-test/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Jan 27 19:13:42 YEKT 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading
Loading