-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create distance types * Fix sync * Create LengthUnit.kt * Implement Length * Implement Length * private meters * Update workflows * Add some missing docs
- Loading branch information
Showing
8 changed files
with
556 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,9 @@ jobs: | |
strategy: | ||
matrix: | ||
path: | ||
- bitrate | ||
- capacity | ||
- length | ||
- percentage | ||
- temperature | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} | ||
} | ||
} |
Oops, something went wrong.