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

Add length #13

Merged
merged 10 commits into from
Nov 13, 2024
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
2 changes: 2 additions & 0 deletions .github/area-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ bitrate:
- bitrate/**
capacity:
- capacity/**
length:
- length/**
percentage:
- percentage/**
temperature:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/code-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
strategy:
matrix:
path:
- bitrate
- capacity
- length
- percentage
- temperature
steps:
Expand Down
1 change: 1 addition & 0 deletions length/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
3 changes: 3 additions & 0 deletions length/MODULE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Module length

Store and convert between measurements of length. For example, `1"` --> `2.54 cm`.
108 changes: 108 additions & 0 deletions length/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import java.net.URI

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)

alias(libs.plugins.detekt)

alias(libs.plugins.dokka)
id("com.boswelja.publish")
}

android {
namespace = "com.boswelja.length"

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

lint {
sarifReport = true
htmlReport = false
}
}

repositories {
google()
mavenCentral()
}

kotlin {
jvmToolchain(21)

// Android
androidTarget {
publishLibraryVariants("release")
}

// JVM
jvm()

// Apple
iosArm64()
iosX64()
macosX64()
macosArm64()
tvosX64()
tvosArm64()
watchosArm32()
watchosArm64()

// Windows
mingwX64()

// Linux
linuxArm64()
linuxX64()

// WASM
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}

sourceSets {
commonMain {
dependencies {
implementation(kotlin("stdlib"))
implementation(libs.ionspin.bignum)
}
}
commonTest {
dependencies {
implementation(kotlin("test"))
}
}
}
}

detekt {
buildUponDefaultConfig = true
config.setFrom("$rootDir/config/detekt.yml")
basePath = rootDir.absolutePath
}

publish {
description = "A Length class that allows you to convert between any unit of length"
repositoryUrl = "https://github.com/boswelja/kotlin-datatypes"
license = "MIT"
}

dokka {
dokkaSourceSets.configureEach {
includes.from("MODULE.md")
sourceLink {
localDirectory.set(projectDir.resolve("src"))
remoteUrl.set(URI("${publish.repositoryUrl.get()}/tree/main/${project.name}/src"))
remoteLineSuffix.set("#L")
}
}
}
Loading
Loading