Skip to content

Commit 8925a39

Browse files
committed
add extracted library
1 parent b19fc60 commit 8925a39

15 files changed

Lines changed: 982 additions & 0 deletions

File tree

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
max_line_length = 120
10+
tab_width = 4
11+
ij_continuation_indent_size = 8
12+
13+
[*.yml]
14+
indent_size = 2
15+
16+
[*.md]
17+
max_line_length = off

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf encoding=utf-8

.github/workflows/main.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish package to GitHub Packages
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: "Version name to publish (eg: x.x.x)"
7+
type: string
8+
required: true
9+
10+
jobs:
11+
publish:
12+
timeout-minutes: 15
13+
runs-on: ubuntu-22.04
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: aboutbits/github-actions-java/setup-and-install@v3
22+
23+
- name: Set Version
24+
run: sed -i 's|<version>BUILD-SNAPSHOT</version>|<version>${{ github.event.inputs.version }}</version>|g' pom.xml
25+
26+
- name: Publish package
27+
run: mvn --batch-mode deploy
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
tag:
32+
timeout-minutes: 5
33+
runs-on: ubuntu-22.04
34+
needs: publish
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Tag Deployment
39+
uses: aboutbits/github-actions-base/git-create-or-update-tag@v1
40+
with:
41+
tag-name: ${{ github.event.inputs.version }}
42+
user-name: 'AboutBits'
43+
user-email: 'info@aboutbits.it'

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/
34+
35+
### Mac ###
36+
.DS_Store
37+
38+
### Local Development ###
39+
application-local.yml

.mvn/wrapper/maven-wrapper.jar

61.1 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

checkstyle-suppressions.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
5+
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
6+
7+
<suppressions>
8+
<suppress checks="Javadoc" files="."/>
9+
<suppress checks="MethodName" files=".*[\\/]src[\\/](test|it)[\\/]"/>
10+
<suppress checks="VisibilityModifier" files=".*[\\/]src[\\/](test|it)[\\/]"/>
11+
<suppress checks="FileTabCharacter" files=".*[\\/]src[\\/](test|it)[\\/]"/>
12+
</suppressions>

checkstyle.xml

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
5+
6+
<!--
7+
8+
Checkstyle configuration that checks the sun coding conventions from:
9+
10+
- the Java Language Specification at
11+
https://docs.oracle.com/javase/specs/jls/se11/html/index.html
12+
13+
- the Sun Code Conventions at https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
14+
15+
- the Javadoc guidelines at
16+
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
17+
18+
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
19+
20+
- some best practices
21+
22+
Checkstyle is very configurable. Be sure to read the documentation at
23+
https://checkstyle.org (or in your downloaded distribution).
24+
25+
Most Checks are configurable, be sure to consult the documentation.
26+
27+
To completely disable a check, just comment it out or delete it from the file.
28+
To suppress certain violations please review suppression filters.
29+
30+
Finally, it is worth reading the documentation.
31+
32+
-->
33+
34+
<module name="Checker">
35+
<!--
36+
If you set the basedir property below, then all reported file
37+
names will be relative to the specified directory. See
38+
https://checkstyle.org/config.html#Checker
39+
40+
<property name="basedir" value="${basedir}"/>
41+
-->
42+
<property name="severity" value="error"/>
43+
44+
<property name="fileExtensions" value="java, properties, xml"/>
45+
46+
<module name="SuppressWarningsFilter"/>
47+
48+
<!-- Excludes all 'module-info.java' files -->
49+
<!-- See https://checkstyle.org/config_filefilters.html -->
50+
<module name="BeforeExecutionExclusionFileFilter">
51+
<property name="fileNamePattern" value="module\-info\.java$"/>
52+
</module>
53+
54+
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
55+
<module name="SuppressionFilter">
56+
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
57+
default="checkstyle-suppressions.xml"/>
58+
<property name="optional" value="true"/>
59+
</module>
60+
61+
<!-- Checks that a package-info.java file exists for each package. -->
62+
<!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
63+
<!--<module name="JavadocPackage"/>-->
64+
65+
<!-- Checks whether files end with a new line. -->
66+
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
67+
<module name="NewlineAtEndOfFile"/>
68+
69+
<!-- Checks that property files contain the same keys. -->
70+
<!-- See https://checkstyle.org/config_misc.html#Translation -->
71+
<module name="Translation"/>
72+
73+
<!-- Checks for Size Violations. -->
74+
<!-- See https://checkstyle.org/config_sizes.html -->
75+
<module name="FileLength"/>
76+
<!--<module name="LineLength">
77+
<property name="fileExtensions" value="java"/>
78+
</module>-->
79+
80+
<!-- Checks for whitespace -->
81+
<!-- See https://checkstyle.org/config_whitespace.html -->
82+
<module name="FileTabCharacter"/>
83+
84+
<!-- Miscellaneous other checks. -->
85+
<!-- See https://checkstyle.org/config_misc.html -->
86+
<module name="RegexpSingleline">
87+
<property name="format" value="\s+$"/>
88+
<property name="minimum" value="0"/>
89+
<property name="maximum" value="0"/>
90+
<property name="message" value="Line has trailing spaces."/>
91+
</module>
92+
93+
<!-- Checks for Headers -->
94+
<!-- See https://checkstyle.org/config_header.html -->
95+
<!-- <module name="Header"> -->
96+
<!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
97+
<!-- <property name="fileExtensions" value="java"/> -->
98+
<!-- </module> -->
99+
100+
<module name="TreeWalker">
101+
102+
<!-- Support for the @SuppressWarnings java annotation -->
103+
<module name="SuppressWarningsHolder"/>
104+
105+
<!-- Checks for Javadoc comments. -->
106+
<!-- See https://checkstyle.org/config_javadoc.html -->
107+
<module name="InvalidJavadocPosition"/>
108+
<module name="JavadocMethod"/>
109+
<module name="JavadocType"/>
110+
<module name="JavadocVariable"/>
111+
<module name="JavadocStyle"/>
112+
<module name="MissingJavadocMethod"/>
113+
114+
<!-- Checks for Naming Conventions. -->
115+
<!-- See https://checkstyle.org/config_naming.html -->
116+
<module name="ConstantName"/>
117+
<module name="LocalFinalVariableName"/>
118+
<module name="LocalVariableName"/>
119+
<module name="MemberName">
120+
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
121+
<message key="name.invalidPattern"
122+
value="Member name ''{0}'' must match pattern ''{1}''."/>
123+
</module>
124+
<module name="MethodName"/>
125+
<module name="PackageName"/>
126+
<module name="ParameterName"/>
127+
<module name="StaticVariableName"/>
128+
<module name="TypeName"/>
129+
130+
<!-- Checks for imports -->
131+
<!-- See https://checkstyle.org/config_imports.html -->
132+
<module name="AvoidStarImport"/>
133+
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
134+
<module name="RedundantImport"/>
135+
<module name="UnusedImports">
136+
<property name="processJavadoc" value="false"/>
137+
</module>
138+
139+
<!-- Checks for Size Violations. -->
140+
<!-- See https://checkstyle.org/config_sizes.html -->
141+
<module name="MethodLength"/>
142+
<module name="ParameterNumber"/>
143+
144+
<!-- Checks for whitespace -->
145+
<!-- See https://checkstyle.org/config_whitespace.html -->
146+
<module name="EmptyForIteratorPad"/>
147+
<module name="GenericWhitespace"/>
148+
<module name="MethodParamPad"/>
149+
<module name="NoWhitespaceAfter"/>
150+
<module name="NoWhitespaceBefore"/>
151+
<module name="OperatorWrap"/>
152+
<module name="ParenPad"/>
153+
<module name="TypecastParenPad"/>
154+
<module name="WhitespaceAfter"/>
155+
<module name="WhitespaceAround"/>
156+
157+
<!-- Modifier Checks -->
158+
<!-- See https://checkstyle.org/config_modifiers.html -->
159+
<module name="ModifierOrder"/>
160+
<module name="RedundantModifier"/>
161+
162+
<!-- Checks for blocks. You know, those {}'s -->
163+
<!-- See https://checkstyle.org/config_blocks.html -->
164+
<module name="AvoidNestedBlocks"/>
165+
<module name="EmptyBlock"/>
166+
<module name="LeftCurly"/>
167+
<module name="NeedBraces"/>
168+
<module name="RightCurly"/>
169+
170+
<!-- Checks for common coding problems -->
171+
<!-- See https://checkstyle.org/config_coding.html -->
172+
<module name="EmptyStatement"/>
173+
<module name="EqualsHashCode"/>
174+
<!--<module name="HiddenField"/>-->
175+
<module name="IllegalInstantiation"/>
176+
<module name="InnerAssignment"/>
177+
<!--<module name="MagicNumber"/>-->
178+
<module name="MissingSwitchDefault"/>
179+
<module name="MultipleVariableDeclarations"/>
180+
<module name="SimplifyBooleanExpression"/>
181+
<module name="SimplifyBooleanReturn"/>
182+
183+
<!-- Checks for class design -->
184+
<!-- See https://checkstyle.org/config_design.html -->
185+
<!--<module name="DesignForExtension"/>-->
186+
<module name="FinalClass"/>
187+
<module name="HideUtilityClassConstructor"/>
188+
<module name="InterfaceIsType"/>
189+
<module name="VisibilityModifier">
190+
<property name="protectedAllowed" value="true"/>
191+
</module>
192+
193+
<!-- Miscellaneous other checks. -->
194+
<!-- See https://checkstyle.org/config_misc.html -->
195+
<module name="ArrayTypeStyle"/>
196+
<!--<module name="FinalParameters"/>-->
197+
<module name="TodoComment"/>
198+
<module name="UpperEll"/>
199+
200+
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
201+
<module name="SuppressionXpathFilter">
202+
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
203+
default="checkstyle-xpath-suppressions.xml"/>
204+
<property name="optional" value="true"/>
205+
</module>
206+
</module>
207+
</module>

license.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright About Bits GmbH
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)