Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
java-version: ${{ matrix.java-version }}

- name: Test
run: ./gradlew check jacocoTestReport --stacktrace --info
run: ./gradlew check koverMergedReport --stacktrace --info

- name: Danger
# Run Danger for PRs originating from within the repo (for fork PRs the token won't give permission to comment)
Expand Down
2 changes: 1 addition & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
shroud.report 'jacoco/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml', 80, 80, true
shroud.report 'build/reports/kover/report.xml', 80, 80, true
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ tasks {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}

val detektAll by registering {
dependsOn(tasks.withType<io.gitlab.arturbosch.detekt.Detekt>())
}

getByName("check") {
dependsOn("detektMain")
dependsOn(detektAll)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
kotlin("jvm")
jacoco
kotlin("multiplatform")
}

val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
Expand All @@ -12,26 +11,15 @@ java {

kotlin {
explicitApi()
}

jacoco {
toolVersion = libs.findVersion("jacoco").get().toString()
}

tasks {
test {
useJUnitPlatform()
}

jacocoTestReport {
dependsOn(test)

reports {
html.required.set(true)
xml.required.set(true)
jvm {
withJava()
testRuns["test"].executionTask.configure {
useJUnitPlatform()
}
}
}

tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins{
kotlin("jvm")
kotlin("multiplatform")
`java-library`
`maven-publish`
id("org.jetbrains.dokka")
id("org.jetbrains.kotlinx.binary-compatibility-validator")
Expand All @@ -15,11 +16,6 @@ tasks {
}
}

val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

val javadocJar by tasks.creating(Jar::class) {
archiveClassifier.set("javadoc")
from(tasks.dokkaHtml)
Expand All @@ -29,7 +25,7 @@ publishing {
publications {
create<MavenPublication>("default") {
from(components["java"])
artifact(sourcesJar)
artifact(tasks.getByName("sourcesJar"))
artifact(javadocJar)

pom {
Expand Down
10 changes: 9 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
plugins {
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.dokka)
alias(libs.plugins.kotlinx.kover)
}

tasks.koverMergedHtmlReport {
excludes = listOf("com.livefront.sealedenum.compilation.*")
}
tasks.koverMergedXmlReport {
excludes = listOf("com.livefront.sealedenum.compilation.*")
}
38 changes: 36 additions & 2 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,43 @@
complexity:
CyclomaticComplexMethod:
excludes: [ '**/generated/**' ]

empty-blocks:
EmptyDefaultConstructor:
excludes: [ '**/generated/**' ]

formatting:
ArgumentListWrapping:
excludes: [ '**/generated/**' ]
EnumEntryNameCase:
excludes: [ '**/generated/**' ]
Filename:
excludes: [ '**/generated/**' ]
Indentation:
excludes: [ '**/generated/**' ]
MaximumLineLength:
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
excludes: [ '**/generated/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
NoConsecutiveBlankLines:
excludes: ['**/generated/**' ]
NoLineBreakBeforeAssignment:
excludes: [ '**/generated/**' ]
SpacingAroundCurly:
excludes: [ '**/generated/**' ]
Wrapping:
excludes: [ '**/generated/**' ]

naming:
ClassNaming:
excludes: [ '**/generated/**' ]
MatchingDeclarationName:
excludes: [ '**/generated/**' ]
TopLevelPropertyNaming:
excludes: ['**/generated/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']

style:
ForbiddenComment:
values: ['FIXME:', 'STOPSHIP:']
MagicNumber:
excludes: [ '**/generated/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
MaxLineLength:
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
excludes: [ '**/generated/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ org.gradle.jvmargs=-Xmx1536m
org.gradle.parallel=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Don't work about mpp stability
kotlin.mpp.stability.nowarn=true
# Don't warn about disabled targets
kotlin.native.ignoreDisabledTargets=true

group=com.livefront.sealedenum
version=0.6.0
5 changes: 3 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ autoService = "1.0"
detekt = "1.22.0"
dokka = "1.8.10"
incap = "0.3"
jacoco = "0.8.8"
junit = "5.8.1"
kotlin = "1.8.0"
kotlinxBinaryCompatibilityValidator = "0.13.0"
kotlinxKover = "0.5.0"
kotlinCompileTesting = "1.5.0"
kotlinPoet = "1.13.0"
ksp = "1.8.0-1.0.9"
Expand Down Expand Up @@ -39,5 +39,6 @@ ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.re

[plugins]
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinx-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kotlinxKover" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
25 changes: 0 additions & 25 deletions jacoco/build.gradle.kts

This file was deleted.

Loading