diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
new file mode 100644
index 0000000..c52d6b2
--- /dev/null
+++ b/.github/workflows/build-and-test.yml
@@ -0,0 +1,9 @@
+name: Build and Test
+
+on:
+ pull_request:
+ branches: [main]
+
+jobs:
+ build-and-test:
+ uses: eclipse-keypop/keypop-actions/.github/workflows/reusable-build-and-test.yml@build-and-test-v1
diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml
new file mode 100644
index 0000000..fb41cc3
--- /dev/null
+++ b/.github/workflows/publish-release.yml
@@ -0,0 +1,10 @@
+name: Publish Release package
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ publish-release:
+ uses: eclipse-keypop/keypop-actions/.github/workflows/reusable-publish-release.yml@publish-release-v1
+ secrets: inherit
diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml
new file mode 100644
index 0000000..b55eca4
--- /dev/null
+++ b/.github/workflows/publish-snapshot.yml
@@ -0,0 +1,10 @@
+name: Publish Snapshot package
+
+on:
+ push:
+ branches: [main]
+
+jobs:
+ publish-snapshot:
+ uses: eclipse-keypop/keypop-actions/.github/workflows/reusable-publish-snapshot.yml@publish-snapshot-v1
+ secrets: inherit
diff --git a/.github/workflows/publish-to-keypop-doc.yml b/.github/workflows/publish-to-keypop-doc.yml
deleted file mode 100644
index 98bd506..0000000
--- a/.github/workflows/publish-to-keypop-doc.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-name: Check Doc Updates and Trigger Documentation Update
-
-on:
- schedule:
- - cron: '0 * * * *' # Every hour
- workflow_dispatch:
-
-permissions:
- checks: write
-
-jobs:
- check-secret:
- runs-on: ubuntu-latest
- outputs:
- has-token: ${{ steps.check.outputs.has-token }}
- steps:
- - id: check
- run: |
- if [ "${{ secrets.ORG_GITHUB_BOT_TOKEN }}" != "" ]; then
- echo "has-token=true" >> "$GITHUB_OUTPUT"
- else
- echo "has-token=false" >> "$GITHUB_OUTPUT"
- fi
-
- check-and-notify:
- needs: check-secret
- if: needs.check-secret.outputs.has-token == 'true'
- runs-on: ubuntu-latest
- steps:
- - name: Check commits dates
- id: check-updates
- run: |
- # Get last commit date from current repo's doc branch
- DOC_RESPONSE=$(curl -s \
- -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
- -H "Accept: application/vnd.github.v3+json" \
- "https://api.github.com/repos/${{ github.repository }}/commits/doc")
-
- DOC_COMMIT_DATE=$(echo $DOC_RESPONSE | jq -r '.commit.author.date')
- DOC_COMMIT_TIME=$(date -d "$DOC_COMMIT_DATE" +%s)
-
- # Get last commit date from keypop-api-docs gh-pages branch
- DOCS_RESPONSE=$(curl -s \
- -H "Authorization: token ${{ secrets.ORG_GITHUB_BOT_TOKEN }}" \
- -H "Accept: application/vnd.github.v3+json" \
- "https://api.github.com/repos/eclipse-keypop/keypop-api-docs/commits/gh-pages")
-
- DOCS_COMMIT_DATE=$(echo $DOCS_RESPONSE | jq -r '.commit.author.date')
- DOCS_COMMIT_TIME=$(date -d "$DOCS_COMMIT_DATE" +%s)
-
- # Compare dates
- if [ $DOC_COMMIT_TIME -gt $DOCS_COMMIT_TIME ]; then
- echo "Doc branch has newer changes"
- echo "Doc commit time: $(date -d @$DOC_COMMIT_TIME)"
- echo "Docs commit time: $(date -d @$DOCS_COMMIT_TIME)"
- echo "should-update=true" >> "$GITHUB_OUTPUT"
- else
- echo "No new changes to publish"
- echo "Doc commit time: $(date -d @$DOC_COMMIT_TIME)"
- echo "Docs commit time: $(date -d @$DOCS_COMMIT_TIME)"
- echo "should-update=false" >> "$GITHUB_OUTPUT"
- fi
-
- - name: Repository Dispatch Event
- if: steps.check-updates.outputs.should-update == 'true'
- uses: peter-evans/repository-dispatch@v3
- with:
- token: ${{ secrets.ORG_GITHUB_BOT_TOKEN }}
- repository: eclipse-keypop/keypop-api-docs
- event-type: update-submodules
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 01ddf38..fc74077 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,7 +9,6 @@ release/
# Gradle
.gradle/
build/
-LICENSE_HEADER
# Eclipse
.classpath
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f75cb47..9698821 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed JUnit configuration.
### Changed
- Added clarification concerning the construction of "case 4" APDU commands in the `ApduRequestSpi` interface.
+- Migrated the CI pipeline from Jenkins to GitHub Actions.
## [2.0.1] - 2024-04-12
### Changed
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 643c836..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,83 +0,0 @@
-#!groovy
-pipeline {
- environment {
- PROJECT_NAME = "keypop-card-java-api"
- PROJECT_BOT_NAME = "Eclipse Keypop Bot"
- }
- agent { kubernetes { yaml javaBuilder('1.0') } }
- stages {
- stage('Import keyring') {
- when { expression { env.GIT_URL.startsWith('https://github.com/eclipse-keypop/keypop-') && env.CHANGE_ID == null } }
- steps { container('java-builder') {
- withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) { sh 'import_gpg "${KEYRING}"' }
- } }
- }
- stage('Prepare settings') { steps { container('java-builder') {
- script {
- env.KEYPOP_VERSION = sh(script: 'grep version gradle.properties | cut -d= -f2 | tr -d "[:space:]"', returnStdout: true).trim()
- env.GIT_COMMIT_MESSAGE = sh(script: 'git log --format=%B -1 | head -1 | tr -d "\n"', returnStdout: true)
- echo "Building version ${env.KEYPOP_VERSION} in branch ${env.GIT_BRANCH}"
- deployRelease = env.GIT_URL == "https://github.com/eclipse-keypop/${env.PROJECT_NAME}.git" && (env.GIT_BRANCH == "main" || env.GIT_BRANCH == "release-${env.KEYPOP_VERSION}") && env.CHANGE_ID == null && env.GIT_COMMIT_MESSAGE.startsWith("Release ${env.KEYPOP_VERSION}")
- deploySnapshot = !deployRelease && env.GIT_URL == "https://github.com/eclipse-keypop/${env.PROJECT_NAME}.git" && (env.GIT_BRANCH == "main" || env.GIT_BRANCH == "release-${env.KEYPOP_VERSION}") && env.CHANGE_ID == null
- }
- sh "chmod +x ./gradlew ./scripts/*.sh"
- } } }
- stage('Check version') {
- steps { container('java-builder') {
- sh "./scripts/check_version.sh ${env.KEYPOP_VERSION}"
- } }
- }
- stage('Build and Test') {
- when { expression { !deploySnapshot && !deployRelease } }
- steps { container('java-builder') {
- sh './gradlew clean build test --no-build-cache --info --stacktrace'
- junit testResults: 'build/test-results/test/*.xml', allowEmptyResults: true
- } }
- }
- stage('Build and Publish Snapshot') {
- when { expression { deploySnapshot } }
- steps { container('java-builder') {
- configFileProvider([configFile(fileId: 'gradle.properties', targetLocation: '/home/jenkins/agent/gradle.properties')]) {
- sh './gradlew clean build test publish --info --stacktrace'
- }
- junit testResults: 'build/test-results/test/*.xml', allowEmptyResults: true
- } }
- }
- stage('Build and Publish Release') {
- when { expression { deployRelease } }
- steps { container('java-builder') {
- configFileProvider([configFile(fileId: 'gradle.properties', targetLocation: '/home/jenkins/agent/gradle.properties')]) {
- sh './gradlew clean build test release --info --stacktrace'
- }
- junit testResults: 'build/test-results/test/*.xml', allowEmptyResults: true
- } }
- }
- stage('Update GitHub Pages') {
- when { expression { deploySnapshot || deployRelease } }
- steps { container('java-builder') {
- sh "./scripts/prepare_javadoc.sh ${env.PROJECT_NAME} ${env.KEYPOP_VERSION} ${deploySnapshot}"
- dir("${env.PROJECT_NAME}") {
- withCredentials([usernamePassword(credentialsId: 'github-bot', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
- sh '''
- git add -A
- git config user.email "${PROJECT_NAME}-bot@eclipse.org"
- git config user.name "${PROJECT_BOT_NAME}"
- git commit --allow-empty -m "docs: update documentation ${JOB_NAME}-${BUILD_NUMBER}"
- git log --graph --abbrev-commit --date=relative -n 5
- git push "https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/eclipse-keypop/${PROJECT_NAME}.git" HEAD:doc
- '''
- }
- }
- } }
- }
- stage('Publish packaging to Eclipse') {
- when { expression { deploySnapshot || deployRelease } }
- steps { container('java-builder') { sshagent(['projects-storage.eclipse.org-bot-ssh']) { sh 'publish_packaging' } } }
- }
- }
- post { always { container('java-builder') {
- archiveArtifacts artifacts: 'build*/libs/**', allowEmptyArchive: true
- archiveArtifacts artifacts: 'build*/reports/tests/**', allowEmptyArchive: true
- archiveArtifacts artifacts: 'build*/reports/jacoco/test/html/**', allowEmptyArchive: true
- } } }
-}
diff --git a/LICENSE_HEADER b/LICENSE_HEADER
new file mode 100644
index 0000000..efc0ba1
--- /dev/null
+++ b/LICENSE_HEADER
@@ -0,0 +1,11 @@
+/* **************************************************************************************
+ * Copyright (c) $YEAR Calypso Networks Association https://calypsonet.org/
+ *
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
+ *
+ * SPDX-License-Identifier: MIT
+ ************************************************************************************** */
\ No newline at end of file
diff --git a/PUBLISHERS.yml b/PUBLISHERS.yml
deleted file mode 100644
index 57bf4dd..0000000
--- a/PUBLISHERS.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-url: https://github.com/eclipse-keypop/keypop-card-java-api
-organization:
- name: Eclipse Keypop
- url: https://keypop.org/
-licenses:
- - name: MIT license
- url: https://opensource.org/license/mit/
- distribution: repo
-developers:
- - name: Keypop Contributors
- email: keypop-dev@eclipse.org
-scm:
- connection: scm:git:git://github.com/eclipse-keypop/keypop-card-java-api.git
- developerConnection: scm:git:https://github.com/eclipse-keypop/keypop-card-java-api.git
- url: https://github.com/eclipse-keypop/keypop-card-java-api
-ciManagement:
- system: Jenkins
- url: https://ci.eclipse.org/keypop/job/Keypop/job/keypop-card-java-api/
diff --git a/README.md b/README.md
index 0a634f4..e4bec92 100644
--- a/README.md
+++ b/README.md
@@ -22,3 +22,8 @@ API documentation and class diagram is available
## About the source code
The code is built with **Gradle** and is compliant with **Java 1.8** in order to address a wide range of applications.
+
+## Continuous Integration
+
+This project uses **GitHub Actions** for continuous integration. Every push and pull request triggers automated builds
+and checks to ensure code quality and maintain compatibility with the defined specifications.
diff --git a/build.gradle.kts b/build.gradle.kts
index 359459c..29814c0 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,62 +1,193 @@
///////////////////////////////////////////////////////////////////////////////
// GRADLE CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
+
plugins {
- java
- id("com.diffplug.spotless") version "6.25.0"
-}
-buildscript {
- repositories {
- mavenLocal()
- mavenCentral()
- }
- dependencies {
- classpath("org.eclipse.keypop:keypop-gradle:0.1.+") { isChanging = true }
- }
+ java
+ `maven-publish`
+ signing
+ id("com.diffplug.spotless") version "6.25.0"
}
-apply(plugin = "org.eclipse.keypop")
///////////////////////////////////////////////////////////////////////////////
// APP CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
-repositories {
- mavenLocal()
- mavenCentral()
-}
+
dependencies {
- testImplementation(platform("org.junit:junit-bom:5.12.2"))
- testImplementation("org.junit.jupiter:junit-jupiter")
- testRuntimeOnly("org.junit.platform:junit-platform-launcher")
- testImplementation("org.assertj:assertj-core:3.25.3")
+ testImplementation(platform("org.junit:junit-bom:5.12.2"))
+ testImplementation("org.junit.jupiter:junit-jupiter")
+ testRuntimeOnly("org.junit.platform:junit-platform-launcher")
+ testImplementation("org.assertj:assertj-core:3.25.3")
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// STANDARD CONFIGURATION FOR JAVA PROJECTS
+///////////////////////////////////////////////////////////////////////////////
+
+if (project.hasProperty("releaseTag")) {
+ project.version = project.property("releaseTag") as String
+ println("Release mode: version set to ${project.version}")
+} else {
+ println("Development mode: version is ${project.version}")
}
val javaSourceLevel: String by project
val javaTargetLevel: String by project
+
java {
- sourceCompatibility = JavaVersion.toVersion(javaSourceLevel)
- targetCompatibility = JavaVersion.toVersion(javaTargetLevel)
- println("Compiling Java $sourceCompatibility to Java $targetCompatibility.")
- withJavadocJar()
- withSourcesJar()
+ sourceCompatibility = JavaVersion.toVersion(javaSourceLevel)
+ targetCompatibility = JavaVersion.toVersion(javaTargetLevel)
+ println("Compiling Java $sourceCompatibility to Java $targetCompatibility.")
+ withJavadocJar()
+ withSourcesJar()
+}
+
+fun copyLicenseFiles() {
+ val metaInfDir = File(layout.buildDirectory.get().asFile, "resources/main/META-INF")
+ val licenseFile = File(project.rootDir, "LICENSE")
+ val noticeFile = File(project.rootDir, "NOTICE.md")
+ metaInfDir.mkdirs()
+ licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true)
+ noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true)
}
-///////////////////////////////////////////////////////////////////////////////
-// TASKS CONFIGURATION
-///////////////////////////////////////////////////////////////////////////////
tasks {
- spotless {
- java {
- target("src/**/*.java")
- licenseHeaderFile("${project.rootDir}/LICENSE_HEADER")
- importOrder("java", "javax", "org", "com", "")
- removeUnusedImports()
- googleJavaFormat()
+ spotless {
+ java {
+ target("src/**/*.java")
+ licenseHeaderFile("${project.rootDir}/LICENSE_HEADER")
+ importOrder("java", "javax", "org", "com", "")
+ removeUnusedImports()
+ googleJavaFormat()
+ }
+ kotlinGradle {
+ target("**/*.kts")
+ ktfmt()
+ }
+ }
+ test {
+ useJUnitPlatform()
+ testLogging { events("passed", "skipped", "failed") }
+ }
+ javadoc {
+ dependsOn(processResources)
+ val javadocLogo = project.findProperty("javadoc.logo") as String
+ val javadocCopyright = project.findProperty("javadoc.copyright") as String
+ val titleProperty = project.findProperty("title") as String
+ (options as StandardJavadocDocletOptions).apply {
+ overview = "src/main/javadoc/overview.html"
+ windowTitle = "$titleProperty - ${project.version}"
+ header(
+ "
$javadocLogo $titleProperty - ${project.version}
")
+ docTitle("$titleProperty - ${project.version}")
+ use(true)
+ bottom(javadocCopyright)
+ encoding = "UTF-8"
+ charSet = "UTF-8"
+ if (JavaVersion.current().isJava11Compatible) {
+ addBooleanOption("html5", true)
+ addStringOption("Xdoclint:none", "-quiet")
+ }
+ }
+ doFirst { println("Generating Javadoc for ${project.name} version ${project.version}") }
+ }
+ jar {
+ dependsOn(processResources)
+ doFirst { copyLicenseFiles() }
+ manifest {
+ attributes(
+ mapOf(
+ "Implementation-Title" to (project.findProperty("title") as String),
+ "Implementation-Version" to project.version,
+ "Implementation-Vendor" to (project.findProperty("organization.name") as String),
+ "Implementation-URL" to (project.findProperty("project.url") as String),
+ "Specification-Title" to (project.findProperty("title") as String),
+ "Specification-Version" to project.version,
+ "Specification-Vendor" to (project.findProperty("organization.name") as String),
+ "Created-By" to
+ "${System.getProperty("java.version")} (${System.getProperty("java.vendor")})",
+ "Build-Jdk" to System.getProperty("java.version")))
+ }
+ }
+ named("sourcesJar") {
+ doFirst { copyLicenseFiles() }
+ manifest {
+ attributes(
+ mapOf(
+ "Implementation-Title" to "${project.findProperty("title") as String} Sources",
+ "Implementation-Version" to project.version))
+ }
+ }
+ named("javadocJar") {
+ dependsOn(javadoc)
+ doFirst { copyLicenseFiles() }
+ manifest {
+ attributes(
+ mapOf(
+ "Implementation-Title" to "${project.findProperty("title") as String} Documentation",
+ "Implementation-Version" to project.version))
+ }
+ }
+}
+
+publishing {
+ publications {
+ create("mavenJava") {
+ from(components["java"])
+ pom {
+ name.set(project.findProperty("title") as String)
+ description.set(project.findProperty("description") as String)
+ url.set(project.findProperty("project.url") as String)
+ licenses {
+ license {
+ name.set(project.findProperty("license.name") as String)
+ url.set(project.findProperty("license.url") as String)
+ distribution.set(project.findProperty("license.distribution") as String)
+ }
+ }
+ developers {
+ developer {
+ name.set(project.findProperty("developer.name") as String)
+ email.set(project.findProperty("developer.email") as String)
+ }
+ }
+ organization {
+ name.set(project.findProperty("organization.name") as String)
+ url.set(project.findProperty("organization.url") as String)
+ }
+ scm {
+ connection.set(project.findProperty("scm.connection") as String)
+ developerConnection.set(project.findProperty("scm.developerConnection") as String)
+ url.set(project.findProperty("scm.url") as String)
}
+ ciManagement {
+ system.set(project.findProperty("ci.system") as String)
+ url.set(project.findProperty("ci.url") as String)
+ }
+ properties.set(
+ mapOf(
+ "project.build.sourceEncoding" to "UTF-8",
+ "maven.compiler.source" to javaSourceLevel,
+ "maven.compiler.target" to javaTargetLevel))
+ }
}
- test {
- useJUnitPlatform()
- testLogging {
- events("passed", "skipped", "failed")
+ }
+ repositories {
+ maven {
+ if (project.hasProperty("sonatypeURL")) {
+ url = uri(project.property("sonatypeURL") as String)
+ credentials {
+ username = project.property("sonatypeUsername") as String
+ password = project.property("sonatypePassword") as String
}
+ }
}
+ }
+}
+
+signing {
+ if (project.hasProperty("releaseTag")) {
+ useGpgCmd()
+ sign(publishing.publications["mavenJava"])
+ }
}
diff --git a/gradle.properties b/gradle.properties
index a87bc21..ec500ee 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,13 +1,41 @@
+# Project Configuration
group = org.eclipse.keypop
title = Keypop Card API
description = API dedicated to card extension development
-version = 2.0.2
+version = 2.0.2-SNAPSHOT
+# Java Configuration
javaSourceLevel = 1.8
javaTargetLevel = 1.8
-# UTF-8 required by javadoc for special characters (ex. copyright) with Java 11+.
-org.gradle.jvmargs="-Dfile.encoding=UTF-8"
+# UTF-8 required by javadoc for special characters (ex. copyright) with Java 11+
+org.gradle.jvmargs = "-Dfile.encoding=UTF-8"
-javadoc.logo =
+# Documentation Configuration
+javadoc.logo =
+javadoc.copyright = Copyright © Eclipse Foundation, Inc. All Rights Reserved.
+# Project URLs
+project.url = https://github.com/eclipse-keypop/keypop-card-java-api
+
+# Organization
+organization.name = Eclipse Keypop
+organization.url = https://keypop.org/
+
+# License
+license.name = MIT license
+license.url = https://opensource.org/license/mit/
+license.distribution = repo
+
+# Developers
+developer.name = Keypop Contributors
+developer.email = keypop-dev@eclipse.org
+
+# Source Control Management
+scm.connection = scm:git:git://github.com/eclipse-keypop/keypop-card-java-api.git
+scm.developerConnection = scm:git:https://github.com/eclipse-keypop/keypop-card-java-api.git
+scm.url = https://github.com/eclipse-keypop/keypop-card-java-api
+
+# Continuous Integration
+ci.system = GitHub Actions
+ci.url = https://github.com/eclipse-keypop/keypop-card-java-api/actions
diff --git a/scripts/check_version.sh b/scripts/check_version.sh
deleted file mode 100644
index 4417fc0..0000000
--- a/scripts/check_version.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-version=$1
-echo "Input version : '$version'"
-
-echo "Fetch tags..."
-git fetch --tags
-
-if [ $(git tag -l "$version") ]; then
- echo "ERROR: version '$version' has already been released"
- exit 1
-fi
diff --git a/scripts/prepare_javadoc.sh b/scripts/prepare_javadoc.sh
deleted file mode 100644
index a96ab45..0000000
--- a/scripts/prepare_javadoc.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh
-
-echo "Compute the current API version..."
-
-repository_name=$1
-version=$2
-is_snapshot=$3
-
-if [ "$is_snapshot" = true ]
-then
- version="$version-SNAPSHOT"
-fi
-
-echo "Computed current API version: $version"
-
-echo "Clone $repository_name..."
-git clone https://github.com/eclipse-keypop/$repository_name.git
-
-cd $repository_name
-
-echo "Checkout doc branch..."
-git checkout -f doc
-
-echo "Delete existing SNAPSHOT directory..."
-rm -rf *-SNAPSHOT
-
-echo "Create target directory $version..."
-mkdir $version
-
-echo "Copy javadoc files..."
-cp -rf ../build/docs/javadoc/* $version/
-
-# Find the latest stable version (first non-SNAPSHOT)
-latest_stable=$(ls -d [0-9]*/ | grep -v SNAPSHOT | cut -f1 -d'/' | sort -Vr | head -n1)
-
-# Create latest-stable copy if we have a stable version
-if [ ! -z "$latest_stable" ]; then
- echo "Creating latest-stable directory pointing to $latest_stable..."
- rm -rf latest-stable
- mkdir latest-stable
- cp -rf "$latest_stable"/* latest-stable/
-
- echo "Creating robots.txt..."
- cat > robots.txt << EOF
-User-agent: *
-Allow: /
-Allow: /latest-stable/
-Disallow: /*/[0-9]*/
-EOF
-fi
-
-echo "Update versions list..."
-echo "| Version | Documents |" > list_versions.md
-echo "|:---:|---|" >> list_versions.md
-
-# Get the list of directories sorted by version number
-sorted_dirs=$(ls -d [0-9]*/ | cut -f1 -d'/' | sort -Vr)
-
-# Loop through each sorted directory
-for directory in $sorted_dirs
-do
- # If this is the stable version, write latest-stable entry first
- if [ "$directory" = "$latest_stable" ]; then
- echo "| **$directory (latest stable)** | [API documentation](latest-stable) |" >> list_versions.md
- else
- echo "| $directory | [API documentation]($directory) |" >> list_versions.md
- fi
-
-done
-
-echo "Computed all versions:"
-cat list_versions.md
-cd ..
-echo "Local docs update finished."
\ No newline at end of file
diff --git a/settings.gradle.kts b/settings.gradle.kts
index a490f3f..9bad784 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -1 +1,16 @@
rootProject.name = "keypop-card-java-api"
+
+pluginManagement {
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ }
+}
+
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ mavenLocal()
+ mavenCentral()
+ }
+}
diff --git a/src/main/java/org/eclipse/keypop/card/AbstractApduException.java b/src/main/java/org/eclipse/keypop/card/AbstractApduException.java
index 9fdd294..8cdd4cc 100644
--- a/src/main/java/org/eclipse/keypop/card/AbstractApduException.java
+++ b/src/main/java/org/eclipse/keypop/card/AbstractApduException.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import org.eclipse.keypop.card.spi.CardRequestSpi;
diff --git a/src/main/java/org/eclipse/keypop/card/ApduResponseApi.java b/src/main/java/org/eclipse/keypop/card/ApduResponseApi.java
index f3c3a39..4cfd43c 100644
--- a/src/main/java/org/eclipse/keypop/card/ApduResponseApi.java
+++ b/src/main/java/org/eclipse/keypop/card/ApduResponseApi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/keypop/card/CardApiProperties.java b/src/main/java/org/eclipse/keypop/card/CardApiProperties.java
index 9fa90d1..3714f92 100644
--- a/src/main/java/org/eclipse/keypop/card/CardApiProperties.java
+++ b/src/main/java/org/eclipse/keypop/card/CardApiProperties.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
/**
diff --git a/src/main/java/org/eclipse/keypop/card/CardBrokenCommunicationException.java b/src/main/java/org/eclipse/keypop/card/CardBrokenCommunicationException.java
index 83d93f1..aafc6f4 100644
--- a/src/main/java/org/eclipse/keypop/card/CardBrokenCommunicationException.java
+++ b/src/main/java/org/eclipse/keypop/card/CardBrokenCommunicationException.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import org.eclipse.keypop.card.spi.CardRequestSpi;
diff --git a/src/main/java/org/eclipse/keypop/card/CardResponseApi.java b/src/main/java/org/eclipse/keypop/card/CardResponseApi.java
index 8c11ea4..80dd699 100644
--- a/src/main/java/org/eclipse/keypop/card/CardResponseApi.java
+++ b/src/main/java/org/eclipse/keypop/card/CardResponseApi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/keypop/card/CardSelectionResponseApi.java b/src/main/java/org/eclipse/keypop/card/CardSelectionResponseApi.java
index 8bf482b..5ffa170 100644
--- a/src/main/java/org/eclipse/keypop/card/CardSelectionResponseApi.java
+++ b/src/main/java/org/eclipse/keypop/card/CardSelectionResponseApi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import org.eclipse.keypop.card.spi.CardRequestSpi;
diff --git a/src/main/java/org/eclipse/keypop/card/ChannelControl.java b/src/main/java/org/eclipse/keypop/card/ChannelControl.java
index ac53ecf..e3c1aae 100644
--- a/src/main/java/org/eclipse/keypop/card/ChannelControl.java
+++ b/src/main/java/org/eclipse/keypop/card/ChannelControl.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
/**
diff --git a/src/main/java/org/eclipse/keypop/card/ParseException.java b/src/main/java/org/eclipse/keypop/card/ParseException.java
index b20792f..9d19f38 100644
--- a/src/main/java/org/eclipse/keypop/card/ParseException.java
+++ b/src/main/java/org/eclipse/keypop/card/ParseException.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
/**
diff --git a/src/main/java/org/eclipse/keypop/card/ProxyReaderApi.java b/src/main/java/org/eclipse/keypop/card/ProxyReaderApi.java
index 7c487e4..d3f0360 100644
--- a/src/main/java/org/eclipse/keypop/card/ProxyReaderApi.java
+++ b/src/main/java/org/eclipse/keypop/card/ProxyReaderApi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import org.eclipse.keypop.card.spi.ApduRequestSpi;
diff --git a/src/main/java/org/eclipse/keypop/card/ReaderBrokenCommunicationException.java b/src/main/java/org/eclipse/keypop/card/ReaderBrokenCommunicationException.java
index 414dfa1..65809a0 100644
--- a/src/main/java/org/eclipse/keypop/card/ReaderBrokenCommunicationException.java
+++ b/src/main/java/org/eclipse/keypop/card/ReaderBrokenCommunicationException.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import org.eclipse.keypop.card.spi.CardRequestSpi;
diff --git a/src/main/java/org/eclipse/keypop/card/UnexpectedStatusWordException.java b/src/main/java/org/eclipse/keypop/card/UnexpectedStatusWordException.java
index 669570f..bffc914 100644
--- a/src/main/java/org/eclipse/keypop/card/UnexpectedStatusWordException.java
+++ b/src/main/java/org/eclipse/keypop/card/UnexpectedStatusWordException.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import org.eclipse.keypop.card.spi.CardRequestSpi;
diff --git a/src/main/java/org/eclipse/keypop/card/spi/ApduRequestSpi.java b/src/main/java/org/eclipse/keypop/card/spi/ApduRequestSpi.java
index 1e1dc08..f64d887 100644
--- a/src/main/java/org/eclipse/keypop/card/spi/ApduRequestSpi.java
+++ b/src/main/java/org/eclipse/keypop/card/spi/ApduRequestSpi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card.spi;
import java.util.Set;
diff --git a/src/main/java/org/eclipse/keypop/card/spi/CardRequestSpi.java b/src/main/java/org/eclipse/keypop/card/spi/CardRequestSpi.java
index 668200a..24d171f 100644
--- a/src/main/java/org/eclipse/keypop/card/spi/CardRequestSpi.java
+++ b/src/main/java/org/eclipse/keypop/card/spi/CardRequestSpi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card.spi;
import java.util.List;
diff --git a/src/main/java/org/eclipse/keypop/card/spi/CardSelectionExtensionSpi.java b/src/main/java/org/eclipse/keypop/card/spi/CardSelectionExtensionSpi.java
index 7e2f850..4fae1de 100644
--- a/src/main/java/org/eclipse/keypop/card/spi/CardSelectionExtensionSpi.java
+++ b/src/main/java/org/eclipse/keypop/card/spi/CardSelectionExtensionSpi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card.spi;
import org.eclipse.keypop.card.CardSelectionResponseApi;
diff --git a/src/main/java/org/eclipse/keypop/card/spi/CardSelectionRequestSpi.java b/src/main/java/org/eclipse/keypop/card/spi/CardSelectionRequestSpi.java
index 310c4a8..aad2967 100644
--- a/src/main/java/org/eclipse/keypop/card/spi/CardSelectionRequestSpi.java
+++ b/src/main/java/org/eclipse/keypop/card/spi/CardSelectionRequestSpi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card.spi;
import java.util.Set;
diff --git a/src/main/java/org/eclipse/keypop/card/spi/SmartCardSpi.java b/src/main/java/org/eclipse/keypop/card/spi/SmartCardSpi.java
index f5f75ea..8b24466 100644
--- a/src/main/java/org/eclipse/keypop/card/spi/SmartCardSpi.java
+++ b/src/main/java/org/eclipse/keypop/card/spi/SmartCardSpi.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card.spi;
/**
diff --git a/src/test/java/org/eclipse/keypop/card/CardApiPropertiesTest.java b/src/test/java/org/eclipse/keypop/card/CardApiPropertiesTest.java
index 55aa030..52cd093 100644
--- a/src/test/java/org/eclipse/keypop/card/CardApiPropertiesTest.java
+++ b/src/test/java/org/eclipse/keypop/card/CardApiPropertiesTest.java
@@ -1,12 +1,14 @@
-/* ******************************************************************************
+/* **************************************************************************************
* Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/
*
- * This program and the accompanying materials are made available under the
- * terms of the MIT License which is available at
- * https://opensource.org/licenses/MIT.
+ * See the NOTICE file(s) distributed with this work for additional information
+ * regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the terms of the
+ * MIT License which is available at https://opensource.org/licenses/MIT
*
* SPDX-License-Identifier: MIT
- ****************************************************************************** */
+ ************************************************************************************** */
package org.eclipse.keypop.card;
import static org.assertj.core.api.Assertions.assertThat;