Skip to content

[build] Drop unused freefair maven-plugin #416

[build] Drop unused freefair maven-plugin

[build] Drop unused freefair maven-plugin #416

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
name: Build Smack
runs-on: ubuntu-24.04
strategy:
matrix:
java:
- 11
- 17
- 21
env:
PRIMARY_JAVA_VERSION: 21
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: temurin
# Caches
- name: Cache Maven
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/build.gradle') }}
restore-keys: |
maven-
- name: Cache Gradle
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: gradle-caches-${{ hashFiles('**/build.gradle') }}
restore-keys:
gradle-caches
- name: Cache Android SDK
uses: actions/cache@v2
with:
path: |
~/.android/sdk
key: android-${{ hashFiles('build.gradle') }}
restore-keys: |
android-
# Pre-reqs
- name: Install GraphViz
run: sudo apt update && sudo apt install graphviz
- name: Install Android SDK Manager
uses: android-actions/setup-android@v3
- name: Install Android SDK
run: |
sdkmanager "platforms;android-21"
# Workaround
- name: Create gradle.properties
run: |
cat <<-EOF > gradle.properties
# Workaround for https://github.com/CycloneDX/cyclonedx-gradle-plugin/issues/349
# suggested at https://docs.gradle.org/current/userguide/upgrading_version_8.html#xml_parsing_now_requires_recent_parsers
systemProp.javax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
systemProp.javax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
systemProp.javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
EOF
# Testing
- name: Gradle Check
run: ./gradlew check --stacktrace
# Test local publish
- name: Gradle publish
run: ./gradlew publishToMavenLocal --stacktrace
# Javadoc
- name: Javadoc
if: ${{ matrix.java == env.PRIMARY_JAVA_VERSION }}
run: ./gradlew javadocAll --stacktrace
# Test Coverage Report
- name: Jacoco Test Coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
if: |
${{ matrix.java == env.PRIMARY_JAVA_VERSION }} &&
${{ env.COVERALLS_REPO_TOKEN != '' }}
run: |
if [[ -z ${COVERALLS_REPO_TOKEN} ]]; then
echo WARNING: COVERALLS_REPO_TOKEN is empty
else
echo COVERALLS_REPO_TOKEN is not empty
fi
./gradlew smack-java11-full:testCodeCoverageReport
./gradlew smack-java11-full:coveralls
# Upload build artifacts
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: smack-java-${{ matrix.java }}
path: |
smack-*/build/libs/*.jar
!**/*-test-fixtures.jar
!**/*-tests.jar