Skip to content

Commit

Permalink
build: Java source and target levels are upgraded from 1.6 to 1.8 (#7)
Browse files Browse the repository at this point in the history
- Gradle version from 6.8.3 to 7.6.4.
  • Loading branch information
jeanpierrefortune committed Apr 11, 2024
1 parent 10a55f0 commit 80a5934
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 146 deletions.
18 changes: 11 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Java source and target levels `1.6` -> `1.8`
### Upgraded
- Gradle `6.8.3` -> `7.6.4`

## [2.1.0] - 2023-11-27
### Added
- Added a new method `int exchangeApiLevel(int coreApiLevel)` to the `LocalServiceSpi` interface to enable Core and
Distributed layers to exchange their JSON API levels.
- `CHANGELOG.md` file (issue [eclipse/keyple#6]).
- `CHANGELOG.md` file (issue [eclipse-keyple/keyple#6]).
- Added project status badges on `README.md` file.
- CI: Forbid the publication of a version already released (issue [#3]).
### Fixed
- CI: code coverage report when releasing.

## [2.0.0] - 2021-10-06
This is the initial release.
It follows the extraction of Keyple 1.0 components contained in the `eclipse/keyple-java` repository to dedicated repositories.
It follows the extraction of Keyple 1.0 components contained in the `eclipse-keyple/keyple-java` repository to dedicated repositories.
It also brings many major API changes.

[unreleased]: https://github.com/eclipse/keyple-distributed-local-java-api/compare/2.1.0...HEAD
[2.1.0]: https://github.com/eclipse/keyple-distributed-local-java-api/compare/2.0.0...2.1.0
[2.0.0]: https://github.com/eclipse/keyple-distributed-local-java-api/releases/tag/2.0.0
[unreleased]: https://github.com/eclipse-keyple/keyple-distributed-local-java-api/compare/2.1.0...HEAD
[2.1.0]: https://github.com/eclipse-keyple/keyple-distributed-local-java-api/compare/2.0.0...2.1.0
[2.0.0]: https://github.com/eclipse-keyple/keyple-distributed-local-java-api/releases/tag/2.0.0

[#3]: https://github.com/eclipse/keyple-distributed-local-java-api/issues/3
[#3]: https://github.com/eclipse-keyple/keyple-distributed-local-java-api/issues/3

[eclipse/keyple#6]: https://github.com/eclipse/keyple/issues/6
[eclipse-keyple/keyple#6]: https://github.com/eclipse-keyple/keyple/issues/6
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
agent { kubernetes { yaml javaBuilder('2.0') } }
stages {
stage('Import keyring') {
when { expression { env.GIT_URL.startsWith('https://github.com/eclipse/keyple-') && env.CHANGE_ID == null } }
when { expression { env.GIT_URL.startsWith('https://github.com/eclipse-keyple/keyple-') && env.CHANGE_ID == null } }
steps { container('java-builder') {
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) { sh 'import_gpg "${KEYRING}"' }
} }
Expand All @@ -18,8 +18,8 @@ pipeline {
env.GIT_COMMIT_MESSAGE = sh(script: 'git log --format=%B -1 | head -1 | tr -d "\n"', returnStdout: true)
env.SONAR_USER_HOME = '/home/jenkins'
echo "Building version ${env.KEYPLE_VERSION} in branch ${env.GIT_BRANCH}"
deployRelease = env.GIT_URL == "https://github.com/eclipse/${env.PROJECT_NAME}.git" && (env.GIT_BRANCH == "main" || env.GIT_BRANCH == "release-${env.KEYPLE_VERSION}") && env.CHANGE_ID == null && env.GIT_COMMIT_MESSAGE.startsWith("Release ${env.KEYPLE_VERSION}")
deploySnapshot = !deployRelease && env.GIT_URL == "https://github.com/eclipse/${env.PROJECT_NAME}.git" && (env.GIT_BRANCH == "main" || env.GIT_BRANCH == "release-${env.KEYPLE_VERSION}") && env.CHANGE_ID == null
deployRelease = env.GIT_URL == "https://github.com/eclipse-keyple/${env.PROJECT_NAME}.git" && (env.GIT_BRANCH == "main" || env.GIT_BRANCH == "release-${env.KEYPLE_VERSION}") && env.CHANGE_ID == null && env.GIT_COMMIT_MESSAGE.startsWith("Release ${env.KEYPLE_VERSION}")
deploySnapshot = !deployRelease && env.GIT_URL == "https://github.com/eclipse-keyple/${env.PROJECT_NAME}.git" && (env.GIT_BRANCH == "main" || env.GIT_BRANCH == "release-${env.KEYPLE_VERSION}") && env.CHANGE_ID == null
}
} } }
stage('Check version') {
Expand Down Expand Up @@ -64,14 +64,14 @@ pipeline {
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/${PROJECT_NAME}.git" HEAD:gh-pages
git push "https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/eclipse-keyple/${PROJECT_NAME}.git" HEAD:gh-pages
'''
}
}
} }
}
stage('Publish Code Quality') {
when { expression { env.GIT_URL.startsWith('https://github.com/eclipse/keyple-') } }
when { expression { env.GIT_URL.startsWith('https://github.com/eclipse-keyple/keyple-') } }
steps { container('java-builder') {
catchError(buildResult: 'SUCCESS', message: 'Unable to log code quality to Sonar.', stageResult: 'FAILURE') {
withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONAR_LOGIN')]) {
Expand Down
4 changes: 2 additions & 2 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This content is produced and maintained by the Eclipse Keyple project.

## Supported platforms

* Java SE 1.6 compact2
* Android 4.4 KitKat API level 19
* Java 1.8
* Android 7.0 Nougat API Level 24

## Trademarks

Expand Down
8 changes: 4 additions & 4 deletions PUBLISHERS.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: https://github.com/eclipse/keyple-distributed-local-java-api
url: https://github.com/eclipse-keyple/keyple-distributed-local-java-api
organization:
name: Eclipse Keyple
url: https://keyple.org/
Expand All @@ -10,9 +10,9 @@ developers:
- name: Keyple Contributors
email: keyple-dev@eclipse.org
scm:
connection: scm:git:git://github.com/eclipse/keyple-distributed-local-java-api.git
developerConnection: scm:git:https://github.com/eclipse/keyple-distributed-local-java-api.git
url: https://github.com/eclipse/keyple-distributed-local-java-api
connection: scm:git:git://github.com/eclipse-keyple/keyple-distributed-local-java-api.git
developerConnection: scm:git:https://github.com/eclipse-keyple/keyple-distributed-local-java-api.git
url: https://github.com/eclipse-keyple/keyple-distributed-local-java-api
ciManagement:
system: Jenkins
url: https://ci.eclipse.org/keyple/job/Keyple/job/keyple-distributed-local-java-api/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ The full documentation, including the **user guide**, **download information** a

## API documentation

API documentation & class diagram is available online: [eclipse.github.io/keyple-distributed-local-java-api](https://eclipse.github.io/keyple-distributed-local-java-api)
API documentation & class diagram is available online: [eclipse-keyple.github.io/keyple-distributed-local-java-api](https://eclipse-keyple.github.io/keyple-distributed-local-java-api)

## Examples

Examples of implementation are available in the following repository: [github.com/eclipse/keyple-java-example](https://github.com/eclipse/keyple-java-example)
Examples of implementation are available in the following repository: [github.com/eclipse-keyple/keyple-java-example](https://github.com/eclipse-keyple/keyple-java-example)

## About the source code

The code is built with **Gradle** and is compliant with **Java 1.6** in order to address a wide range of applications.
The code is built with **Gradle** and is compliant with **Java 1.8** in order to address a wide range of applications.
11 changes: 5 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
///////////////////////////////////////////////////////////////////////////////
plugins {
java
id("com.diffplug.spotless") version "5.10.2"
id("com.diffplug.spotless") version "6.25.0"
id("org.sonarqube") version "3.1"
jacoco
}
buildscript {
repositories {
mavenLocal()
maven(url = "https://repo.eclipse.org/service/local/repositories/maven_central/content")
mavenCentral()
}
dependencies {
Expand All @@ -24,13 +23,13 @@ apply(plugin = "org.eclipse.keyple")
///////////////////////////////////////////////////////////////////////////////
repositories {
mavenLocal()
maven(url = "https://repo.eclipse.org/service/local/repositories/maven_central/content")
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
}
dependencies {
testImplementation("junit:junit:4.13.2")
testImplementation("org.assertj:assertj-core:3.15.0")
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.assertj:assertj-core:3.25.3")
}

val javaSourceLevel: String by project
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ title = Keyple Distributed Local Java API
description = API dedicated to distributed local services development
version = 2.1.1

javaSourceLevel = 1.6
javaTargetLevel = 1.6
javaSourceLevel = 1.8
javaTargetLevel = 1.8
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 80a5934

Please sign in to comment.