Skip to content

Commit 4d1ecce

Browse files
committed
Init
0 parents  commit 4d1ecce

File tree

219 files changed

+13557
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+13557
-0
lines changed

.editorconfig

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[*]
2+
max_line_length = 150
3+
4+
ktlint_standard = enabled # Disable all rules from the `standard` rule set provided by KtLint
5+
ktlint_standard_no-empty-first-line-in-class-body = disabled
6+
ktlint_standard_chain-method-continuation = disabled
7+
ktlint_standard_no-blank-line-before-rbrace = disabled
8+
ktlint_standard_no-wildcard-imports = disabled
9+
ktlint_standard_function-signature = disabled
10+
ktlint_standard_class-signature = disabled
11+
ktlint_standard_property-naming = disabled
12+
ktlint_standard_multiline-expression-wrapping = disabled
13+
ktlint_standard_blank-line-before-declaration = disabled
14+
ktlint_standard_function-expression-body = disabled
15+
ktlint_standard_no-consecutive-blank-lines = disabled
16+
ktlint_standard_string-template-indent = disabled
17+
ktlint_standard_wrapping = disabled
18+
ktlint_standard_trailing-comma-on-call-site = disabled
19+
ktlint_standard_trailing-ktlint_trailing-comma-on-call-site = disabled
20+
ktlint_standard_trailing-comma-on-declaration-site = disabled
21+
ktlint_standard_trailing-trailing-comma-on-call-site = disabled
22+
ktlint_standard_final-newline = enabled
23+
ktlint_standard_comment-spacing = disabled
24+
ktlint_standard_argument-list-wrapping = disabled
25+
ktlint_standard_indent = disabled
26+
ktlint_standard_if-else-bracing = disabled
27+
ktlint_standard_if-else-wrapping = disabled
28+
ktlint_standard_import-ordering = disabled
29+
ktlint_standard_multiline-if-else = disabled
30+
ktlint_standard_parameter-list-wrapping = disabled
31+
ktlint_standard_discouraged-comment-location = disabled
32+
ktlint_standard_enum-wrapping = disabled
33+
ktlint_standard_annotation = disabled
34+
ktlint_standard_no-consecutive-comments = disabled
35+
ktlint_standard_block-comment-initial-star-alignment = disabled
36+
ktlint_standard_parameter-list-spacing = disabled
37+
ktlint_standard_comment-wrapping = disabled
38+
ktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled
39+
ktlint_standard_some-experimental-rule = disabled # Disables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint
40+
ktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)
41+
ktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)
42+

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [hannesa2]
2+
buy_me_a_coffee: 'hannesa2'

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "gradle" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
- package-ecosystem: "github-actions"
13+
directory: "/" # Location of package manifests
14+
schedule:
15+
interval: "weekly"

.github/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- someuser
7+
categories:
8+
- title: Breaking Changes 🛠
9+
labels:
10+
- breaking-change
11+
- title: Exciting New Features 🎉
12+
labels:
13+
- enhancement
14+
- title: Espresso test
15+
labels:
16+
- Espresso
17+
- title: Bug fix
18+
labels:
19+
- bugfix
20+
- title: Pipeline
21+
labels:
22+
- pipeline
23+
- title: Dependencies
24+
labels:
25+
- dependencies
26+
- title: Other Changes
27+
labels:
28+
- "*"

.github/stale.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 360
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 90
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: [ ]
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- pinned
16+
17+
# Set to true to ignore issues in a project (defaults to false)
18+
exemptProjects: false
19+
20+
# Set to true to ignore issues in a milestone (defaults to false)
21+
exemptMilestones: false
22+
23+
# Set to true to ignore issues with an assignee (defaults to false)
24+
exemptAssignees: false
25+
26+
# Label to use when marking as stale
27+
staleLabel: "stale"
28+
29+
# Comment to post when marking as stale. Set to `false` to disable
30+
markComment: >
31+
This issue has been automatically marked as stale because it has not had
32+
recent activity. Please comment here if it is still valid so that we can
33+
reprioritize. Thank you!
34+
35+
# Comment to post when removing the stale label.
36+
# unmarkComment: >
37+
# Your comment here.
38+
39+
# Comment to post when closing a stale Issue or Pull Request.
40+
closeComment: >
41+
Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.
42+
43+
# Limit the number of actions per hour, from 1-30. Default is 30
44+
limitPerRun: 20
45+
46+
# Limit to only `issues` or `pulls`
47+
# only: issues
48+
49+
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
50+
# pulls:
51+
# daysUntilStale: 30
52+
# markComment: >
53+
# This pull request has been automatically marked as stale because it has not had
54+
# recent activity. It will be closed if no further activity occurs. Thank you
55+
# for your contributions.
56+
57+
# issues:
58+
# exemptLabels:
59+
# - confirmed

.github/workflows/pullrequest.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: Pull request
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
env:
9+
resourceRunID: ${{ github.run_id }}-${{ github.run_number }}
10+
11+
jobs:
12+
Build:
13+
name: Test
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ ubuntu-24.04 ]
19+
api: [ 34 ]
20+
abi: [ x86_64 ]
21+
emulatorApi: [ 14 ]
22+
tag: [ 'google_apis' ]
23+
# include:
24+
# - os: macOS-latest
25+
# abi: x86_64
26+
# api: 28
27+
# emulatorApi: [ 9 ]
28+
# tag: 'default'
29+
steps:
30+
- name: kvm support
31+
run: |
32+
egrep -c '(vmx|svm)' /proc/cpuinfo
33+
id
34+
sudo adduser $USER kvm
35+
sudo chown -R $USER /dev/kvm
36+
id
37+
- name: run MQTT server
38+
run: |
39+
sudo apt-get install mosquitto mosquitto-clients
40+
echo "=> Subscribe on the background"
41+
mosquitto_sub -t "installtest" -d -i BackgroundClient &
42+
echo "=> Send test message"
43+
mosquitto_pub -m "message from mosquitto_pub ForegroundClient" -t "installtest" -d -i ForegroundClient
44+
echo "=> wait"
45+
sleep 4
46+
- name: prepare
47+
run: |
48+
sudo apt-get update && sudo apt-get install -y exiftool imagemagick xdg-utils libimage-exiftool-perl zsh jq xorg
49+
# brew install exiftool imagemagick
50+
- uses: actions/checkout@v6
51+
with:
52+
submodules: true
53+
- name: set up JDK
54+
uses: actions/setup-java@v5
55+
with:
56+
distribution: 'adopt'
57+
java-version: 17
58+
- uses: gradle/actions/wrapper-validation@v5
59+
- name: Install Android SDK
60+
uses: hannesa2/action-android/install-sdk@0.1.16.7
61+
- name: Android Emulator test
62+
uses: hannesa2/action-android/emulator-run-cmd@0.1.16.7
63+
with:
64+
cmd: ./gradlew cAT --continue
65+
api: ${{ matrix.api }}
66+
tag: ${{ matrix.tag }}
67+
abi: ${{ matrix.abi }}
68+
cmdOptions: -noaudio -no-boot-anim -no-window -metrics-collection
69+
disableAnimations: true
70+
bootTimeout: 720
71+
- uses: actions/upload-artifact@v6
72+
if: ${{ always() }}
73+
with:
74+
name: MQ-Espresso-${{ matrix.api }}-${{ matrix.abi }}-report-${{ matrix.emulatorApi }}
75+
path: |
76+
./**/build/reports/androidTests/connected
77+
./**/build/outputs/androidTest-results/connected
78+
- name: Archive screenshots ${{ matrix.emulatorApi }}
79+
uses: actions/upload-artifact@v6
80+
if: ${{ always() }}
81+
with:
82+
name: MQ-Screenshots-${{ matrix.api }}-${{ matrix.abi }}-${{ matrix.emulatorApi }}
83+
path: |
84+
basicSample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
85+
basicSample/build/outputs/androidTest-results/connected
86+
extendedSample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
87+
extendedSample/build/outputs/androidTest-results/connected
88+
serviceLibrary/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
89+
serviceLibrary/build/outputs/androidTest-results/connected
90+
- name: Compare screenshots
91+
if: ${{ always() }}
92+
env:
93+
CLASSIC_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
emulatorApi: ${{ matrix.emulatorApi }}
95+
run: |
96+
ls -ls extendedSample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
97+
cp extendedSample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected/emulator-5554\ -\ ${{ matrix.emulatorApi }}/* screenshotsToCompare${{ matrix.emulatorApi }}
98+
export DISPLAY=:99
99+
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
100+
echo ${{ env.resourceRunID }}
101+
./screenShotScript/screenShotCompare.sh ${{ env.resourceRunID }}
102+
- name: Archive screenshots diffs ${{ matrix.emulatorApi }}
103+
if: ${{ always() }}
104+
uses: actions/upload-artifact@v6
105+
with:
106+
name: MQ-Screenshots-diffs-${{ matrix.emulatorApi }}
107+
path: |
108+
screenshotDiffs
109+
screenshotsToCompare${{ matrix.emulatorApi }}/view-*.png
110+
- name: Show git status ${{ matrix.emulatorApi }}
111+
if: ${{ always() }}
112+
run: |
113+
git add screenshotsToCompare${{ matrix.emulatorApi }}
114+
git status
115+
[ "$(git status -s -uno)" ] && exit 1 || exit 0
116+
Check:
117+
name: Check
118+
runs-on: ${{ matrix.os }}
119+
strategy:
120+
fail-fast: false
121+
matrix:
122+
os: [ ubuntu-22.04 ]
123+
steps:
124+
- uses: actions/checkout@v6
125+
with:
126+
submodules: true
127+
- name: set up JDK
128+
uses: actions/setup-java@v5
129+
with:
130+
distribution: 'adopt'
131+
java-version: 17
132+
- name: Install Android SDK
133+
uses: hannesa2/action-android/install-sdk@0.1.16.7
134+
- name: Run tests
135+
run: ./gradlew test
136+
- name: Kotlin code checks
137+
run: ./gradlew ktlintCheck
138+
- name: Code checks
139+
run: ./gradlew check
140+
- name: Archive Lint report
141+
uses: actions/upload-artifact@v6
142+
if: ${{ always() }}
143+
with:
144+
name: MQTT-Lint-report
145+
path: |
146+
./**/build/reports/lint-results*.html
147+
./**/build/reports/ktlint/ktlintMainSourceSetCheck/ktlintMainSourceSetCheck.txt

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
name: Publish release
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- uses: actions/checkout@v6
14+
with:
15+
submodules: true
16+
- name: Find Tag
17+
id: tagger
18+
uses: jimschubert/query-tag-action@v2
19+
with:
20+
skip-unshallow: 'true'
21+
commit-ish: HEAD
22+
- name: Check pre-release
23+
run: |
24+
echo "tag=${{steps.tagger.outputs.tag}}"
25+
if [[ ${{ steps.tagger.outputs.tag }} == *alpha* || ${{ steps.tagger.outputs.tag }} == *beta* ]]
26+
then
27+
prerelease=true
28+
else
29+
prerelease=false
30+
fi
31+
echo "PRE_RELEASE=$prerelease" >> $GITHUB_ENV
32+
echo "prerelease=$prerelease"
33+
- name: Install JDK
34+
uses: actions/setup-java@v5
35+
with:
36+
distribution: 'adopt'
37+
java-version: 17
38+
- name: Install Android SDK
39+
uses: hannesa2/action-android/install-sdk@0.1.16.7
40+
- name: Build project
41+
run: ./gradlew assembleRelease
42+
env:
43+
VERSION: ${{steps.tagger.outputs.tag}}
44+
- name: Create Release
45+
uses: softprops/action-gh-release@v2
46+
with:
47+
tag_name: ${{steps.tagger.outputs.tag}}
48+
generate_release_notes: true
49+
prerelease: ${{ env.PRE_RELEASE }}
50+
name: ${{steps.tagger.outputs.tag}}
51+
files: |
52+
./serviceLibrary/build/outputs/aar/serviceLibrary-release.aar
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Update Gradle Wrapper
2+
3+
on:
4+
schedule:
5+
- cron: "0 6 * * MON"
6+
7+
jobs:
8+
update-gradle-wrapper:
9+
runs-on: ubuntu-22.04
10+
11+
steps:
12+
- uses: actions/checkout@v6
13+
with:
14+
submodules: true
15+
- name: Install JDK
16+
uses: actions/setup-java@v5
17+
with:
18+
distribution: 'adopt'
19+
java-version: 17
20+
- name: Update Gradle Wrapper
21+
uses: gradle-update/update-gradle-wrapper-action@v2
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
set-distribution-checksum: false

0 commit comments

Comments
 (0)