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
23 changes: 23 additions & 0 deletions .env.oft-current
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# 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 Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=SC2148,SC2034

# The file patterns that specify the relevant parts of the latest uProtocol Specification
# that this component is supposed to implement
UP_SPEC_FILE_PATTERNS="up-spec/basics/uattributes.adoc up-spec/up-l1/README.adoc up-spec/up-l1/mqtt5.adoc"

# The file patterns that specify this component's resources which contain specification items
# that cover the requirements
COMPONENT_FILE_PATTERNS="*.adoc *.md .github src"

OFT_FILE_PATTERNS="$UP_SPEC_FILE_PATTERNS $COMPONENT_FILE_PATTERNS"
OFT_TAGS="_,TransportLayerImpl,TransportLayerImplPush"
23 changes: 23 additions & 0 deletions .env.oft-latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# 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 Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=SC2148,SC2034

# The file patterns that specify the relevant parts of the latest uProtocol Specification
# that this component is supposed to implement
UP_SPEC_FILE_PATTERNS="up-spec/basics/uattributes.adoc up-spec/up-l1/README.adoc up-spec/up-l1/mqtt5.adoc"

# The file patterns that specify this component's resources which contain specification items
# that cover the requirements
COMPONENT_FILE_PATTERNS="*.adoc *.md .github src"

OFT_FILE_PATTERNS="$UP_SPEC_FILE_PATTERNS $COMPONENT_FILE_PATTERNS"
OFT_TAGS="_,TransportLayerImpl,TransportLayerImplPush"
20 changes: 18 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# 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 Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Verify PR

on:
Expand All @@ -10,9 +23,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
33 changes: 24 additions & 9 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
name: Continuous Integration
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# 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 Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Publish SNAPSHOT to Maven Central

on:
push:
Expand All @@ -12,19 +25,21 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # configure settings.xml
distribution: 'temurin'
java-version: '17'
server-id: ossrh
server-username: OSSRH_USER
server-password: OSSRH_PASSWORD
server-id: central
server-username: MAVEN_CENTRAL_USER
server-password: MAVEN_CENTRAL_PASSWORD

- name: Build and Publish to OSSRH snapshot repo
- name: Build and Publish to Maven Central snapshot repository
run: mvn clean deploy
env:
OSSRH_USER: ${{ secrets.ORG_OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
MAVEN_CENTRAL_USER: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_TOKEN_PASSWORD }}
21 changes: 18 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# 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 Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: "CodeQL"

on:
Expand Down Expand Up @@ -28,16 +41,18 @@ jobs:
fail-fast: false
matrix:
include:
# Analyzes Java code directly from the codebase without a build
# use autobuild to also include types generated from proto3 files
- language: java-kotlin
build-mode: none # analyzes Java only
build-mode: autobuild
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

# Setup java 17.
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/coverage-comment-pr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# 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 Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Add coverage comment to PR

on:
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# 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 Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Java Test and Coverage

on:
Expand All @@ -17,9 +30,11 @@ jobs:

- name: Checkout code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
submodules: 'recursive'

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # configure settings.xml
distribution: 'temurin'
java-version: '17'
Expand All @@ -32,8 +47,7 @@ jobs:

- name: Run tests with coverage
run: |
mvn clean test jacoco:report

mvn clean verify -Djacoco.skip=false

- name: Extract JaCoCo report
run: |
Expand All @@ -46,7 +60,7 @@ jobs:


- name: Upload JaCoCo Coverage report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: target/site/jacoco
Expand Down
30 changes: 22 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
name: Release to maven central
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# 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 Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Release to Maven Central

on:
workflow_dispatch:
Expand All @@ -19,25 +32,26 @@ jobs:

- uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.BOT_GITHUB_TOKEN }}

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # configure settings.xml
distribution: 'temurin'
java-version: '17'
server-id: ossrh
server-username: OSSRH_USER
server-password: OSSRH_PASSWORD
server-id: central
server-username: MAVEN_CENTRAL_USER
server-password: MAVEN_CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Stage to Nexus and Release to Maven central
run: |
mvn -B release:clean release:prepare -P release release:perform
mvn -B release:clean release:prepare release:perform
env:
OSSRH_USER: ${{ secrets.ORG_OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
MAVEN_CENTRAL_USER: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_TOKEN_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }}
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,5 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# VSCode
.vscode/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "up-spec"]
path = up-spec
url = https://github.com/eclipse-uprotocol/up-spec
61 changes: 61 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="LineLength">
<property name="max" value="120"/>
</module>
<module name="SuppressWithPlainTextCommentFilter">
<property name="checkFormat" value="LineLength" />
<property name="offCommentFormat" value='^.*"""$' />
<property name="onCommentFormat" value='^\s*"""\s*(?:[,;]|.+)$' />
</module>
<!-- Coding style rules -->
<module name="TreeWalker">

<module name="SuppressionCommentFilter" />

<!-- Naming conventions -->
<module name="ConstantName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="TypeName"/>

<!-- Imports -->
<module name="UnusedImports"/>

<!-- Formatting -->
<module name="WhitespaceAround"/>
<module name="WhitespaceAfter"/>
<module name="Indentation"/>
<module name="LeftCurly"/>
<module name="RightCurly"/>

<!-- Miscellaneous -->
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true"/>
</module>
<module name="NestedIfDepth">
<property name="max" value="3"/>
</module>
<module name="JavadocMethod">
<property name="accessModifiers" value="public,protected"/>
</module>
<module name="JavadocStyle">
<property name="checkEmptyJavadoc" value="true" />
<property name="scope" value="protected" />
</module>
<module name="JavadocType">
<property name="allowMissingParamTags" value="true" />
<property name="scope" value="protected" />
</module>
</module>
</module>
Loading