Skip to content

Commit

Permalink
Bump dependencies + small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ashtanko committed Sep 5, 2024
1 parent 3f0fab6 commit d80d5d5
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 17 deletions.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feel free to open a issue or submit a pull request for any bugs/improvements.
# License

```xml
Designed and developed by 2022 ashtanko (Oleksii Shtanko)
Designed and developed by 2024 ashtanko (Oleksii Shtanko)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -51,3 +51,43 @@ Designed and developed by 2022 ashtanko (Oleksii Shtanko)
See the License for the specific language governing permissions and
limitations under the License.
```

# detekt

## Metrics

* 3 number of properties

* 14 number of functions

* 3 number of classes

* 1 number of packages

* 3 number of kt files

## Complexity Report

* 190 lines of code (loc)

* 102 source lines of code (sloc)

* 67 logical lines of code (lloc)

* 63 comment lines of code (cloc)

* 15 cyclomatic complexity (mcc)

* 2 cognitive complexity

* 0 number of total code smells

* 61% comment source ratio

* 223 mcc per 1,000 lloc

* 0 code smells per 1,000 lloc

## Findings (0)

generated with [detekt version 1.23.6](https://detekt.dev/) on 2024-09-05 13:01:09 UTC
16 changes: 11 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
import org.gradle.kotlin.dsl.apply
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType

Expand Down Expand Up @@ -117,10 +118,12 @@ subprojects {
apply<com.diffplug.gradle.spotless.SpotlessPlugin>()
}

koverReport {
verify {
rule {
minBound(80)
kover {
reports {
verify {
rule {
minBound(80)
}
}
}
}
Expand Down Expand Up @@ -260,7 +263,10 @@ dependencies {
}

testImplementation(mockk)
testImplementation(junit)
junit.apply {
testImplementation(api)
testImplementation(params)
}
testImplementation(assertj)
testImplementation(mockito)
testImplementation(mockito.kotlin)
Expand Down
54 changes: 54 additions & 0 deletions config/main.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<h1 align="center">Kotlin Base Project Setup</h1></br>

<p align="center">
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a>
<a href="https://github.com/ashtanko/kotlin-app-template/actions/workflows/ci.yml"><img alt="Build Status" src="https://github.com/ashtanko/kotlin-app-template/actions/workflows/ci.yml/badge.svg"/></a>
<a href="https://sonarcloud.io/dashboard?id=ashtanko_kotlin-app-template"><img alt="Quality Gate Status" src="https://sonarcloud.io/api/project_badges/measure?project=ashtanko_kotlin-app-template&metric=alert_status"/></a>
<a href="https://sonarcloud.io/dashboard?id=ashtanko_kotlin-app-template"><img alt="Lines of Code" src="https://sonarcloud.io/api/project_badges/measure?project=ashtanko_kotlin-app-template&metric=ncloc"/></a>
<a href="https://sonarcloud.io/dashboard?id=ashtanko_kotlin-app-template"><img alt="Coverage" src="https://sonarcloud.io/api/project_badges/measure?project=ashtanko_kotlin-app-template&metric=coverage"/></a>
<a href="https://codecov.io/gh/ashtanko/kotlin-app-template"><img alt="Codecov" src="https://codecov.io/gh/ashtanko/kotlin-app-template/branch/main/graph/badge.svg?token=JEU9EIJMHA"/></a>
<a href="https://www.codefactor.io/repository/github/ashtanko/kotlin-app-template"><img alt="CodeFactor" src="https://www.codefactor.io/repository/github/ashtanko/kotlin-app-template/badge"/></a>
<a href="https://app.codacy.com/gh/ashtanko/kotlin-app-template/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img alt="Codacy Badge" src="https://app.codacy.com/project/badge/Grade/4935d531e41241faa0ce25eeddb67533"/></a>
<a href="https://app.codacy.com/gh/ashtanko/kotlin-app-template/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage"><img alt="Codacy Badge" src="https://app.codacy.com/project/badge/Coverage/4935d531e41241faa0ce25eeddb67533"/></a>
<a href="https://codeclimate.com/github/ashtanko/kotlin-app-template/maintainability"><img alt="Maintainability" src="https://api.codeclimate.com/v1/badges/9448fad9e03dd6eee651/maintainability"/></a>
<a href="https://codeclimate.com/github/ashtanko/kotlin-app-template/test_coverage"><img alt="Test Coverage" src="https://api.codeclimate.com/v1/badges/9448fad9e03dd6eee651/test_coverage"/></a>
</p><br>

A simple Github template that lets you create an **Kotlin** project and be up and running in a **few seconds**.

This template is focused on delivering a project with **static analysis** and **continuous integration** already in
place.

## Features 🦄

- **100% Kotlin-only template**.
- Kotlin K2 Compiler.
- Examples of JUnit5 tests.
- 100% Gradle Kotlin DSL setup.
- CI Setup with GitHub Actions.
- Aggressive Kotlin Static Analysis via `detekt`, `ktlint`, `diktat` and `spotless`.
- Issues Template (bug report + feature request).
- Documentation Engine for Kotlin via `dokka`

## Contributing 🤝

Feel free to open a issue or submit a pull request for any bugs/improvements.

# License

```xml
Designed and developed by 2024 ashtanko (Oleksii Shtanko)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

23 changes: 12 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
[versions]
coroutines = "1.9.0-RC" # https://github.com/Kotlin/kotlinx.coroutines
junit = "5.11.0-M2" # https://junit.org/junit5/
kotlin = "2.0.0" # https://github.com/JetBrains/kotlin
mockk = "1.13.11" # https://mockk.io/
coroutines = "1.9.0-RC.2" # https://github.com/Kotlin/kotlinx.coroutines
junit = "5.11.0-M2" # https://junit.org/junit5 | https://central.sonatype.com/artifact/org.junit.jupiter/junit-jupiter
kotlin = "2.0.20" # https://github.com/JetBrains/kotlin
mockk = "1.13.12" # https://mockk.io
detekt = "1.23.6" # https://github.com/detekt/detekt
dokka = "1.9.10" # https://github.com/Kotlin/dokka
spotless = "7.0.0.BETA1" # https://github.com/diffplug/spotless
dokka = "1.9.20" # https://github.com/Kotlin/dokka
spotless = "7.0.0.BETA2" # https://github.com/diffplug/spotless
dependency = "1.32.0" # https://github.com/autonomousapps/dependency-analysis-gradle-plugin
pitest = "1.15.0" # https://plugins.gradle.org/plugin/info.solidsoft.pitest
pinterestKtlint = "0.49.0" # https://github.com/pinterest/ktlint
ktlint = "12.1.1" # https://github.com/JLLeitschuh/ktlint-gradle
assertj = "3.26.0" # https://mvnrepository.com/artifact/org.assertj/assertj-core
kover = "0.7.5" # https://github.com/Kotlin/kotlinx-kover
assertj = "3.26.3" # https://mvnrepository.com/artifact/org.assertj/assertj-core | https://assertj.github.io/doc
kover = "0.8.3" # https://github.com/Kotlin/kotlinx-kover
diktat = "2.0.0" # https://github.com/saveourtool/diktat
mockito = "5.12.0" # https://mvnrepository.com/artifact/org.mockito/mockito-core
mockito_kotlin = "2.0.0" # https://mvnrepository.com/artifact/com.nhaarman.mockitokotlin2/mockito-kotlin
mockito = "5.13.0" # https://mvnrepository.com/artifact/org.mockito/mockito-core
mockito_kotlin = "2.2.0" # https://mvnrepository.com/artifact/com.nhaarman.mockitokotlin2/mockito-kotlin

[libraries]
junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junit-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }

kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version.ref = "coroutines" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
Expand Down

0 comments on commit d80d5d5

Please sign in to comment.