Skip to content

Commit

Permalink
Fix indentation in docs and refactor pom.xml elements
Browse files Browse the repository at this point in the history
Standardize indentation in RELEASE.md and README.md for better readability. Refactor pom.xml files to compact XML declarations and enhance configuration clarity. Add includes for pom.xml formatting in root pom.xml file.
  • Loading branch information
Konstantin Pavlov authored and Konstantin Pavlov committed Nov 22, 2024
1 parent 9a3300d commit 26e51ac
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 57 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Thank you for investing your time and effort in contributing to my project, I ap
- **Code Style**: Follow the existing code style present in the project.
- **Discuss Large Features**: Large features should be discussed with maintainers before implementation.
- **Thread Safety**: Ensure that the code you write is thread-safe.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# awesome-kotlin-maven-template


[![Kotlin CI with Maven](https://github.com/kpavlov/awesome-kotlin-maven-template/actions/workflows/maven.yml/badge.svg?branch=main)](https://github.com/kpavlov/awesome-kotlin-maven-template/actions/workflows/maven.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4da0f1abf0fd49038bb29676b6d38579)](https://app.codacy.com/gh/kpavlov/awesome-kotlin-maven-template/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Coverage](https://app.codacy.com/project/badge/Coverage/4da0f1abf0fd49038bb29676b6d38579)](https://app.codacy.com/gh/kpavlov/awesome-kotlin-maven-template/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)


## How to run

Create `.env` file in root directory and add your API keys:
Expand All @@ -15,14 +13,18 @@ OPENAI_API_KEY=sk-xxxxx
```

Building project locally:

```shell
mvn clean verify
```

or using Make

```shell
make build
```

## Contributing

We welcome contributions! Please see the [Contributing Guidelines](CONTRIBUTING.md) for details.

53 changes: 27 additions & 26 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,42 @@

1. Cleanup

```shell
mvn release:clean
```
```shell
mvn release:clean
```

delete git tag, if needed:
```shell
git tag -d v0.1.0
```

```shell
git tag -d v0.1.0
```
2. Prepare the release:
```shell
mvn release:prepare \
-Dresume=false \
-DpushChanges=false
```

```shell
mvn release:prepare \
-Dresume=false \
-DpushChanges=false
```
3. Perform the release

```shell
GPG_TTY=$(tty) && \
export GPG_TTY && \
mvn release:perform -DlocalCheckout=true
```
https://stackoverflow.com/a/57591830/3315474

```shell
GPG_TTY=$(tty) && \
export GPG_TTY && \
mvn release:perform -DlocalCheckout=true
```

https://stackoverflow.com/a/57591830/3315474

In case of GPG error `gpg: signing failed: Screen or window too small`, [try this](https://stackoverflow.com/a/67498543/3315474):
```shell
gpg -K --keyid-format SHORT
```
In case of GPG error `gpg: signing failed: Screen or window too small`, [try this](https://stackoverflow.com/a/67498543/3315474):

```shell
gpg -K --keyid-format SHORT
```

4. Push

```shell
git push origin
git push origin --tags
```
```shell
git push origin
git push origin --tags
```

7 changes: 2 additions & 5 deletions bom/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>me.kpavlov.project</groupId>
Expand All @@ -14,8 +12,7 @@
<packaging>pom</packaging>

<name>Project :: BOM</name>
<description>Bill of Materials POM for getting full, complete set of compatible versions of project modules
</description>
<description>Bill of Materials POM for getting full, complete set of compatible versions of project modules</description>

<dependencyManagement>
<dependencies>
Expand Down
4 changes: 1 addition & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>me.kpavlov.project</groupId>
Expand Down
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,17 @@
<ktlint/>
</kotlin>
<markdown>
<includes> <!-- You have to set the target manually -->
<includes>
<!-- You have to set the target manually -->
<include>**/*.md</include>
</includes>
<flexmark/>
</markdown>
<pom>
<includes>
<!-- You have to set the target manually -->
<include>**/pom.xml</include>
</includes>
<sortPom>
<nrOfIndentSpace>4</nrOfIndentSpace>
<expandEmptyElements>false</expandEmptyElements>
Expand Down
38 changes: 18 additions & 20 deletions reports/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>me.kpavlov.project</groupId>
Expand Down Expand Up @@ -32,6 +30,23 @@
<plugin>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kover-maven-plugin</artifactId>

<configuration>
<aggregate>true</aggregate>
<logGroupBy>CLASS</logGroupBy>
<warningInsteadOfFailure>true</warningInsteadOfFailure>
<rules>
<rule>
<groupBy>CLASS</groupBy>
<bounds>
<bound>
<aggregationForGroup>COVERED_COUNT</aggregationForGroup>
<minValue>100</minValue>
</bound>
</bounds>
</rule>
</rules>
</configuration>
<executions>
<execution>
<id>kover-xml</id>
Expand All @@ -52,23 +67,6 @@
</goals>
</execution>
</executions>

<configuration>
<aggregate>true</aggregate>
<logGroupBy>CLASS</logGroupBy>
<warningInsteadOfFailure>true</warningInsteadOfFailure>
<rules>
<rule>
<groupBy>CLASS</groupBy>
<bounds>
<bound>
<aggregationForGroup>COVERED_COUNT</aggregationForGroup>
<minValue>100</minValue>
</bound>
</bounds>
</rule>
</rules>
</configuration>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 26e51ac

Please sign in to comment.