Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump org.jlleitschuh.gradle.ktlint from 11.1.0 to 11.3.1 in /unit-api-kotlin #311

Merged
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
4 changes: 0 additions & 4 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ jobs:
with:
java-version: 17
distribution: adopt
- name: Ktlint
uses: eskatos/gradle-command-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef
with:
arguments: ktlintCheck
- name: Unit Tests
uses: eskatos/gradle-command-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef
with:
Expand Down
3 changes: 2 additions & 1 deletion unit-api-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.8.10"
id("org.jlleitschuh.gradle.ktlint") version "11.1.0"
id("org.jlleitschuh.gradle.ktlint") version "11.3.1"

// Auto Update Versions
id("se.patrikerdes.use-latest-versions")
Expand All @@ -25,6 +25,7 @@ tasks.withType<KotlinCompile>().all {
jvmTarget = "17"
}
}

/**
* Checks if the given version is stable or not.
* A version is stable, if it is semver conform,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import com.raynigon.unit.api.core.units.si.SISystemUnitsConstants.Second as cSec
* @return the Quantity<Time> object with nano second resolution
*/
fun Duration.toQuantity(): Quantity<Time> {
if (this.nano == 0)
if (this.nano == 0) {
return cSecond(this.seconds)
}
return (cSecond(this.seconds) + cNanoSecond(this.nano))
}

Expand Down