Skip to content

Commit 01c254d

Browse files
committed
Add android-test/ module with Gradle-based Android library that tests
1 parent fe0e716 commit 01c254d

10 files changed

Lines changed: 355 additions & 2 deletions

File tree

.github/workflows/android-test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Android Compatibility
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-android:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Java 17 for AGP
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'temurin'
19+
java-version: 17
20+
cache: 'gradle'
21+
22+
- name: Build Java library JAR
23+
run: mvn package -Dmaven.test.skip=true
24+
25+
- name: Build Android module
26+
run: cd android-test && ./gradlew build

.github/workflows/maven.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ jobs:
1313
test:
1414

1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
java-version: [11, 21]
1619

1720
steps:
1821
- uses: actions/checkout@v4
19-
- name: Set up JDK 11
22+
- name: Set up JDK ${{ matrix.java-version }}
2023
uses: actions/setup-java@v4
2124
with:
2225
# Use same in Dockerfile
2326
distribution: 'corretto'
24-
java-version: 11
27+
java-version: ${{ matrix.java-version }}
2528
cache: 'maven'
2629

2730
- name: Maven Compile

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
build
1111
aspose-barcode-cloud.iml
1212
!tools/*
13+
!**/gradle-wrapper.jar
1314
.idea
15+
.gradle
16+
local.properties
1417

1518
**/configuration*.json
1619
snippets_test/

android-test/build.gradle

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
plugins {
2+
id 'com.android.library' version '9.1.0'
3+
}
4+
5+
android {
6+
namespace 'com.aspose.barcode.cloud.androidtest'
7+
compileSdk 35
8+
9+
defaultConfig {
10+
minSdk 23
11+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
12+
}
13+
14+
compileOptions {
15+
sourceCompatibility JavaVersion.VERSION_1_8
16+
targetCompatibility JavaVersion.VERSION_1_8
17+
}
18+
}
19+
20+
dependencies {
21+
implementation files('../target/aspose-barcode-cloud-26.3.0.jar')
22+
testImplementation 'junit:junit:4.13.2'
23+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
24+
}
57.8 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Jan 27 19:13:42 YEKT 2023
2+
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
4+
distributionPath=wrapper/dists
5+
zipStorePath=wrapper/dists
6+
zipStoreBase=GRADLE_USER_HOME

android-test/gradlew

Lines changed: 185 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android-test/gradlew.bat

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android-test/settings.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
pluginManagement {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
gradlePluginPortal()
6+
}
7+
}
8+
dependencyResolutionManagement {
9+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10+
repositories {
11+
google()
12+
mavenCentral()
13+
}
14+
}
15+
rootProject.name = 'android-test'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest />

0 commit comments

Comments
 (0)