Skip to content

Commit 6a68b15

Browse files
committed
build: added qulice profile and ci/cd scripts
1 parent 497f633 commit 6a68b15

File tree

7 files changed

+214
-0
lines changed

7 files changed

+214
-0
lines changed

.gitattributes

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Check out all text files in UNIX format, with LF as end of line
2+
# Don't change this file. If you have any ideas about it, please
3+
# submit a separate issue about it and we'll discuss.
4+
5+
* text=auto eol=lf
6+
*.java ident
7+
*.xml ident

.github/workflows/mvn.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: "Build & Test"
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags-ignore:
8+
- "v*"
9+
pull_request:
10+
branches:
11+
- master
12+
jobs:
13+
mvn:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-20.04, windows-2022, macos-12]
18+
java: [21]
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: ${{ matrix.java }}
25+
- uses: actions/cache@v3
26+
with:
27+
path: ~/.m2/repository
28+
key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }}
29+
restore-keys: |
30+
${{ runner.os }}-jdk-${{ matrix.java }}-maven-
31+
- run: java -version
32+
- run: mvn -version
33+
- run: mvn --errors --batch-mode clean install -Pqulice

pom.xml

+17
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,21 @@
3838
<artifactId>spv-storage</artifactId>
3939
<version>0.0.1</version>
4040
<packaging>jar</packaging>
41+
42+
<profiles>
43+
<profile>
44+
<id>qulice</id>
45+
<build>
46+
<plugins>
47+
<plugin>
48+
<groupId>com.qulice</groupId>
49+
<artifactId>qulice-maven-plugin</artifactId>
50+
<configuration>
51+
<license>file:${basedir}/LICENSE</license>
52+
</configuration>
53+
</plugin>
54+
</plugins>
55+
</build>
56+
</profile>
57+
</profiles>
4158
</project>
+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) 2024 Decision-Driven Development
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
package ru.ewc.spv.core;
26+
27+
/**
28+
* I am the main class of the SPV application.
29+
*
30+
* @since 0.0.1
31+
*/
32+
public class Main {
33+
/**
34+
* The greeting to be used.
35+
*/
36+
private final String greeting;
37+
38+
/**
39+
* Primary Ctor.
40+
*
41+
* @param greeting The greeting to be used.
42+
*/
43+
public Main(final String greeting) {
44+
this.greeting = greeting;
45+
}
46+
47+
/**
48+
* I say hello.
49+
*
50+
* @return The greeting.
51+
*/
52+
public String sayHello() {
53+
return this.greeting;
54+
}
55+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) 2024 Decision-Driven Development
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
/**
26+
* Contains the core classes of the SPV application.
27+
*/
28+
package ru.ewc.spv.core;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) 2024 Decision-Driven Development
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
package ru.ewc.spv.core;
26+
27+
import org.hamcrest.MatcherAssert;
28+
import org.hamcrest.Matchers;
29+
import org.junit.jupiter.api.Test;
30+
31+
/**
32+
* Unit-tests for the Main class.
33+
*
34+
* @since 0.0.1
35+
*/
36+
class MainTest {
37+
@Test
38+
void shouldSayHello() {
39+
final String greeting = new Main("Hello, world!").sayHello();
40+
MatcherAssert.assertThat(
41+
"Unexpected greeting",
42+
greeting,
43+
Matchers.is("Hello, world!")
44+
);
45+
}
46+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) 2024 Decision-Driven Development
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
/**
26+
* Contains unit-tests for the core classes of the SPV application.
27+
*/
28+
package ru.ewc.spv.core;

0 commit comments

Comments
 (0)