diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 7402117..063050c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -21,4 +21,22 @@ jobs: cache: gradle - name: Gradle Check - run: ./gradlew build check + run: ./gradlew buildAll check + + release: + name: Release + needs: build + if: ${{ needs.build.result == 'success' && contains('refs/heads/master', github.ref) }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 11 # release should always be done with min supported JDK + cache: gradle + - name: Publish Artifacts + run: ./gradlew publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index a62a829..e8642c9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion group = "io.kixi" version = "1.0.0-beta-4" @@ -6,30 +7,140 @@ description = "ki-core" plugins { `java-library` + `maven-publish` kotlin("jvm") version "1.9.+" + id("org.jetbrains.dokka") version "1.9.+" + signing } java { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } +kotlin { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) + languageVersion.set(KotlinVersion.KOTLIN_1_9) + } +} repositories { mavenCentral() } dependencies { - implementation(kotlin("stdlib")) + implementation(kotlin("stdlib-jdk8")) testImplementation(platform("org.junit:junit-bom:5.10.+")) testImplementation("org.junit.jupiter:junit-jupiter") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") } -tasks.withType().configureEach { - kotlinOptions { - apiVersion = "1.9" - languageVersion = "1.9" - jvmTarget = "${JavaVersion.VERSION_11}" - // allWarningsAsErrors = true +// Ensure that artifacts for jar, kotlinSourcesJar, and dokkaJavadocJar +// tasks all start with same text (should be lowercase) +tasks.withType() { + archiveBaseName.set("ki-core") +} + +// use Dokka for generating a javadoc jar +tasks.register("dokkaHtmlJar") { + dependsOn(tasks.dokkaHtml) + from(tasks.dokkaHtml.flatMap { it.outputDirectory }) + archiveClassifier.set("html-docs") +} +tasks.register("dokkaJavadocJar") { + dependsOn(tasks.dokkaJavadoc) + from(tasks.dokkaJavadoc.flatMap { it.outputDirectory }) + archiveClassifier.set("javadoc") +} +tasks.javadoc { + if (JavaVersion.current().isJava9Compatible) { + (options as StandardJavadocDocletOptions).addBooleanOption("html5", true) + } +} + +// Allows all artifacts to be built using: "./gradlew buildAll" +tasks.register("buildAll") { + dependsOn(":jar", ":kotlinSourcesJar", ":dokkaJavadocJar") +} + +// todo: publishing to maven central will require signed artifacts +//signing { +// sign(publishing.publications["mavenJava"]) +//} + +val sourcesJar by tasks.named("kotlinSourcesJar") +val javadocJar by tasks.named("dokkaJavadocJar") + +publishing { + repositories { + maven { + if (System.getenv().containsKey("CI")) { + // todo: Rather than use GitHub Packages it would be better to publish to maven central (requires signed artifacts) + name = "GitHub-Packages" + url = uri("https://maven.pkg.github.com/kixi-io/Ki.Core-JVM/") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } else { + val releasesRepoUrl = layout.buildDirectory.dir("repos/releases") + val snapshotsRepoUrl = layout.buildDirectory.dir("repos/snapshots") + val localReleasePath = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl + url = uri(localReleasePath) + name = "local-build-dir" + } + } + } + publications { + // This section configures all the required fields that are needed when releasing to a maven repo + // see: https://docs.gradle.org/current/userguide/publishing_maven.html + create("mavenJava") { + from(components["java"]) + artifact(sourcesJar) + artifact(javadocJar) + + pom { + groupId = "${project.group}" + artifactId = "ki-core" + name = "Ki.Core" + description = "A JVM implementation of the Ki.Core library" + url = "http://kixi.io" + properties = mapOf( + "project.build.sourceEncoding" to "UTF-8", + "project.reporting.outputEncoding" to "UTF-8", + "maven.compiler.source" to JavaVersion.VERSION_11.majorVersion + ) + licenses { + license { + name = "MIT License" + url = "https://raw.githubusercontent.com/kixi-io/Ki.Core-JVM/master/LICENSE" + distribution = "repo" + } + } + developers { + developer { + id = "dleuck" + name = "Daniel Leuck" + } + developer { + id = "singingbush" + name = "Samael" + } + developer { + id = "alessiostalla" + name = "Alessio Stalla" + } + } + issueManagement { + system = "Pivotal-Tracker" + url = "https://www.pivotaltracker.com/n/projects/2462351" + } + scm { + connection = "scm:git:git://github.com:kixi-io/Ki.Core-JVM.git" + developerConnection = "scm:git:ssh://github.com:kixi-io/Ki.Core-JVM.git" + url = "http://github.com/kixi-io/Ki.Core-JVM/" + } + } + } } } diff --git a/src/main/kotlin/io/kixi/BigDecimal+.kt b/src/main/kotlin/io/kixi/core/BigDecimal+.kt similarity index 90% rename from src/main/kotlin/io/kixi/BigDecimal+.kt rename to src/main/kotlin/io/kixi/core/BigDecimal+.kt index d7d944d..883c179 100644 --- a/src/main/kotlin/io/kixi/BigDecimal+.kt +++ b/src/main/kotlin/io/kixi/core/BigDecimal+.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core import java.math.BigDecimal diff --git a/src/main/kotlin/io/kixi/Call.kt b/src/main/kotlin/io/kixi/core/Call.kt similarity index 99% rename from src/main/kotlin/io/kixi/Call.kt rename to src/main/kotlin/io/kixi/core/Call.kt index 7695711..a690270 100644 --- a/src/main/kotlin/io/kixi/Call.kt +++ b/src/main/kotlin/io/kixi/core/Call.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core /** * A Call is a [KTS](https://github.com/kixi-io/Ki.Docs/wiki/Ki-Types) type that @@ -122,4 +122,4 @@ open class Call { * @return The hash (based on the output from toString()) */ override fun hashCode(): Int = toString().hashCode() -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/Collection+.kt b/src/main/kotlin/io/kixi/core/Collection+.kt similarity index 97% rename from src/main/kotlin/io/kixi/Collection+.kt rename to src/main/kotlin/io/kixi/core/Collection+.kt index 3e03bb8..d730bb2 100644 --- a/src/main/kotlin/io/kixi/Collection+.kt +++ b/src/main/kotlin/io/kixi/core/Collection+.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core /** * Stringify a collection with the given separator. The default is ", ". @@ -36,4 +36,4 @@ fun Array<*>.toString(separator: String = ", "): String { if (i.hasNext()) buffer.append(separator) } return buffer.toString() -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/Duration+.kt b/src/main/kotlin/io/kixi/core/Duration+.kt similarity index 84% rename from src/main/kotlin/io/kixi/Duration+.kt rename to src/main/kotlin/io/kixi/core/Duration+.kt index 40a9f00..b907dd0 100644 --- a/src/main/kotlin/io/kixi/Duration+.kt +++ b/src/main/kotlin/io/kixi/core/Duration+.kt @@ -1,7 +1,7 @@ -package io.kixi +package io.kixi.core import java.time.Duration fun Duration.kiFormat(zeroPad:Boolean = false): String { return Ki.formatDuration(this, zeroPad) -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/Ki.kt b/src/main/kotlin/io/kixi/core/Ki.kt similarity index 99% rename from src/main/kotlin/io/kixi/Ki.kt rename to src/main/kotlin/io/kixi/core/Ki.kt index 118137a..4ef1302 100644 --- a/src/main/kotlin/io/kixi/Ki.kt +++ b/src/main/kotlin/io/kixi/core/Ki.kt @@ -1,7 +1,7 @@ -package io.kixi +package io.kixi.core -import io.kixi.text.ParseException -import io.kixi.text.escape +import io.kixi.core.text.ParseException +import io.kixi.core.text.escape import java.lang.Math.abs import java.math.BigDecimal import java.time.* @@ -576,4 +576,4 @@ class Ki { return true } } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/KiTZ.kt b/src/main/kotlin/io/kixi/core/KiTZ.kt similarity index 99% rename from src/main/kotlin/io/kixi/KiTZ.kt rename to src/main/kotlin/io/kixi/core/KiTZ.kt index e478602..f7a62e7 100644 --- a/src/main/kotlin/io/kixi/KiTZ.kt +++ b/src/main/kotlin/io/kixi/core/KiTZ.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core import java.time.ZoneOffset @@ -116,4 +116,4 @@ class KiTZ { "US/SST" to ZoneOffset.of("-11") ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/Log.kt b/src/main/kotlin/io/kixi/core/Log.kt similarity index 97% rename from src/main/kotlin/io/kixi/Log.kt rename to src/main/kotlin/io/kixi/core/Log.kt index bd809ef..de97fdd 100644 --- a/src/main/kotlin/io/kixi/Log.kt +++ b/src/main/kotlin/io/kixi/core/Log.kt @@ -1,7 +1,7 @@ @file:Suppress("unused") @file:JvmName("Log") -package io.kixi +package io.kixi.core /** * Ki standard logging. In the future, this will provide options for writing to the diff --git a/src/main/kotlin/io/kixi/Map+.kt b/src/main/kotlin/io/kixi/core/Map+.kt similarity index 97% rename from src/main/kotlin/io/kixi/Map+.kt rename to src/main/kotlin/io/kixi/core/Map+.kt index 9683500..6dc1be4 100644 --- a/src/main/kotlin/io/kixi/Map+.kt +++ b/src/main/kotlin/io/kixi/core/Map+.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core /** * Stringify a map with the given separator and assignment character. @@ -21,4 +21,4 @@ fun Map<*,*>.toString(separator: CharSequence = ", ", assignment: CharSequence = if (i.hasNext()) buffer.append(separator) } return buffer.toString() -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/NSID.kt b/src/main/kotlin/io/kixi/core/NSID.kt similarity index 92% rename from src/main/kotlin/io/kixi/NSID.kt rename to src/main/kotlin/io/kixi/core/NSID.kt index 5572849..b44fc74 100644 --- a/src/main/kotlin/io/kixi/NSID.kt +++ b/src/main/kotlin/io/kixi/core/NSID.kt @@ -1,7 +1,7 @@ -package io.kixi +package io.kixi.core -import io.kixi.text.ParseException -import io.kixi.text.isKiIdentifier +import io.kixi.core.text.ParseException +import io.kixi.core.text.isKiIdentifier /** * NSIDs are an ID (key identifier) with an optional namespace. They are used for @@ -33,4 +33,4 @@ data class NSID(val name:String, val namespace:String = "") : Comparable { override fun toString() = if(namespace != "") "$namespace:$name" else name override fun compareTo(other: NSID): Int = toString().compareTo(other.toString()) -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/Range.kt b/src/main/kotlin/io/kixi/core/Range.kt similarity index 99% rename from src/main/kotlin/io/kixi/Range.kt rename to src/main/kotlin/io/kixi/core/Range.kt index 63c2842..28745e0 100644 --- a/src/main/kotlin/io/kixi/Range.kt +++ b/src/main/kotlin/io/kixi/core/Range.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core /** * A Ki Range can be inclusive or exclusive on both ends, may be reversed (e.g. 5..1), diff --git a/src/main/kotlin/io/kixi/Type.kt b/src/main/kotlin/io/kixi/core/Type.kt similarity index 85% rename from src/main/kotlin/io/kixi/Type.kt rename to src/main/kotlin/io/kixi/core/Type.kt index 367a4d2..4f94ec1 100644 --- a/src/main/kotlin/io/kixi/Type.kt +++ b/src/main/kotlin/io/kixi/core/Type.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core import java.math.BigDecimal import kotlin.reflect.KClass @@ -17,10 +17,10 @@ enum class Type(val kclass: KClass<*>, val supertype: Type?) { Date(java.time.LocalDate::class, Any), LocalDateTime(java.time.LocalDateTime::class, Any), ZonedDateTime(java.time.ZonedDateTime::class, Any), Duration(java.time.Duration::class, Any), - Version(io.kixi.Version::class, Any), + Version(io.kixi.core.Version::class, Any), Blob(ByteArray::class, Any), - Quantity(io.kixi.uom.Quantity::class, Any), - Range(io.kixi.Range::class, Any), + Quantity(io.kixi.core.uom.Quantity::class, Any), + Range(io.kixi.core.Range::class, Any), List(java.util.List::class, Any), Map(java.util.Map::class, Any), // nil @@ -49,13 +49,13 @@ enum class Type(val kclass: KClass<*>, val supertype: Type?) { is java.time.LocalDateTime -> LocalDateTime is java.time.ZonedDateTime -> ZonedDateTime is java.time.Duration -> Duration - is io.kixi.Version -> Version + is io.kixi.core.Version -> Version is ByteArray -> Blob - is io.kixi.uom.Quantity<*> -> Quantity - is io.kixi.Range<*> -> Range + is io.kixi.core.uom.Quantity<*> -> Quantity + is io.kixi.core.Range<*> -> Range is kotlin.collections.List<*> -> List is kotlin.collections.Map<*,*> -> Map else -> null } } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/TypeDef.kt b/src/main/kotlin/io/kixi/core/TypeDef.kt similarity index 99% rename from src/main/kotlin/io/kixi/TypeDef.kt rename to src/main/kotlin/io/kixi/core/TypeDef.kt index 140df52..018aa73 100644 --- a/src/main/kotlin/io/kixi/TypeDef.kt +++ b/src/main/kotlin/io/kixi/core/TypeDef.kt @@ -1,6 +1,6 @@ -package io.kixi +package io.kixi.core -import io.kixi.uom.* +import io.kixi.core.uom.* import kotlin.reflect.KClass open class TypeDef(val type:Type, val nullable:Boolean) { @@ -234,4 +234,4 @@ class MapDef(nullable:Boolean, val keyDef: TypeDef, val valueDef: TypeDef) : return true } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/Version.kt b/src/main/kotlin/io/kixi/core/Version.kt similarity index 98% rename from src/main/kotlin/io/kixi/Version.kt rename to src/main/kotlin/io/kixi/core/Version.kt index 24bfd69..7439a0e 100644 --- a/src/main/kotlin/io/kixi/Version.kt +++ b/src/main/kotlin/io/kixi/core/Version.kt @@ -1,7 +1,7 @@ -package io.kixi +package io.kixi.core -import io.kixi.text.ParseException -import io.kixi.text.countDigits +import io.kixi.core.text.ParseException +import io.kixi.core.text.countDigits import java.lang.IllegalArgumentException /** diff --git a/src/main/kotlin/io/kixi/text/ParseException.kt b/src/main/kotlin/io/kixi/core/text/ParseException.kt similarity index 98% rename from src/main/kotlin/io/kixi/text/ParseException.kt rename to src/main/kotlin/io/kixi/core/text/ParseException.kt index e86a4b4..4e7e053 100644 --- a/src/main/kotlin/io/kixi/text/ParseException.kt +++ b/src/main/kotlin/io/kixi/core/text/ParseException.kt @@ -1,4 +1,4 @@ -package io.kixi.text +package io.kixi.core.text /** * A ParseException represents an problem encountered while parsing text. @@ -60,4 +60,4 @@ open class ParseException : RuntimeException { } override fun toString() : String = message -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/text/Text+.kt b/src/main/kotlin/io/kixi/core/text/Text+.kt similarity index 99% rename from src/main/kotlin/io/kixi/text/Text+.kt rename to src/main/kotlin/io/kixi/core/text/Text+.kt index e5acaf5..85f1938 100644 --- a/src/main/kotlin/io/kixi/text/Text+.kt +++ b/src/main/kotlin/io/kixi/core/text/Text+.kt @@ -1,6 +1,6 @@ @file:Suppress("unused") -package io.kixi.text +package io.kixi.core.text import java.util.* diff --git a/src/main/kotlin/io/kixi/uom/IncompatibleUnitsException.kt b/src/main/kotlin/io/kixi/core/uom/IncompatibleUnitsException.kt similarity index 69% rename from src/main/kotlin/io/kixi/uom/IncompatibleUnitsException.kt rename to src/main/kotlin/io/kixi/core/uom/IncompatibleUnitsException.kt index 496728b..4d05ebd 100644 --- a/src/main/kotlin/io/kixi/uom/IncompatibleUnitsException.kt +++ b/src/main/kotlin/io/kixi/core/uom/IncompatibleUnitsException.kt @@ -1,6 +1,6 @@ -package io.kixi.uom +package io.kixi.core.uom import java.lang.RuntimeException class IncompatibleUnitsException(from:Unit, to:Unit) : - RuntimeException("Can't convert from ${from::class.java.simpleName} to ${to::class.java.simpleName}") \ No newline at end of file + RuntimeException("Can't convert from ${from::class.java.simpleName} to ${to::class.java.simpleName}") diff --git a/src/main/kotlin/io/kixi/uom/NoSuchUnitException.kt b/src/main/kotlin/io/kixi/core/uom/NoSuchUnitException.kt similarity index 85% rename from src/main/kotlin/io/kixi/uom/NoSuchUnitException.kt rename to src/main/kotlin/io/kixi/core/uom/NoSuchUnitException.kt index f00f437..6d92b2b 100644 --- a/src/main/kotlin/io/kixi/uom/NoSuchUnitException.kt +++ b/src/main/kotlin/io/kixi/core/uom/NoSuchUnitException.kt @@ -1,4 +1,4 @@ -package io.kixi.uom +package io.kixi.core.uom import java.lang.RuntimeException diff --git a/src/main/kotlin/io/kixi/uom/Quantity.kt b/src/main/kotlin/io/kixi/core/uom/Quantity.kt similarity index 99% rename from src/main/kotlin/io/kixi/uom/Quantity.kt rename to src/main/kotlin/io/kixi/core/uom/Quantity.kt index 056c9b3..949fb59 100644 --- a/src/main/kotlin/io/kixi/uom/Quantity.kt +++ b/src/main/kotlin/io/kixi/core/uom/Quantity.kt @@ -1,7 +1,7 @@ -package io.kixi.uom +package io.kixi.core.uom -import io.kixi.text.isKiIDStart -import io.kixi.whole +import io.kixi.core.text.isKiIDStart +import io.kixi.core.whole import java.math.BigDecimal as Dec /** @@ -612,4 +612,4 @@ class Quantity : Comparable> { } } } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/kixi/uom/Unit.kt b/src/main/kotlin/io/kixi/core/uom/Unit.kt similarity index 99% rename from src/main/kotlin/io/kixi/uom/Unit.kt rename to src/main/kotlin/io/kixi/core/uom/Unit.kt index 1ea0a3e..5987050 100644 --- a/src/main/kotlin/io/kixi/uom/Unit.kt +++ b/src/main/kotlin/io/kixi/core/uom/Unit.kt @@ -1,6 +1,6 @@ @file:Suppress("unused") -package io.kixi.uom +package io.kixi.core.uom import java.math.BigDecimal import java.math.MathContext diff --git a/src/test/kotlin/io/kixi/BlobTest.kt b/src/test/kotlin/io/kixi/core/BlobTest.kt similarity index 94% rename from src/test/kotlin/io/kixi/BlobTest.kt rename to src/test/kotlin/io/kixi/core/BlobTest.kt index c87293d..3c89043 100644 --- a/src/test/kotlin/io/kixi/BlobTest.kt +++ b/src/test/kotlin/io/kixi/core/BlobTest.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test @@ -16,4 +16,4 @@ class BlobTest { assertEquals("Hello", String(Ki.parseBlob(".blob(SGVsbG8=)"))) } -} \ No newline at end of file +} diff --git a/src/test/kotlin/io/kixi/DateTimeTest.kt b/src/test/kotlin/io/kixi/core/DateTimeTest.kt similarity index 99% rename from src/test/kotlin/io/kixi/DateTimeTest.kt rename to src/test/kotlin/io/kixi/core/DateTimeTest.kt index 9cc7924..1dd14db 100644 --- a/src/test/kotlin/io/kixi/DateTimeTest.kt +++ b/src/test/kotlin/io/kixi/core/DateTimeTest.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/kixi/DurationTest.kt b/src/test/kotlin/io/kixi/core/DurationTest.kt similarity index 96% rename from src/test/kotlin/io/kixi/DurationTest.kt rename to src/test/kotlin/io/kixi/core/DurationTest.kt index 969877c..312f9bb 100644 --- a/src/test/kotlin/io/kixi/DurationTest.kt +++ b/src/test/kotlin/io/kixi/core/DurationTest.kt @@ -1,7 +1,7 @@ -package io.kixi +package io.kixi.core -import io.kixi.Ki.Companion.formatDuration as format -import io.kixi.Ki.Companion.parseDuration as parse +import io.kixi.core.Ki.Companion.formatDuration as format +import io.kixi.core.Ki.Companion.parseDuration as parse import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/kixi/KiTest.kt b/src/test/kotlin/io/kixi/core/KiTest.kt similarity index 94% rename from src/test/kotlin/io/kixi/KiTest.kt rename to src/test/kotlin/io/kixi/core/KiTest.kt index bac2ad7..9ea0d0a 100644 --- a/src/test/kotlin/io/kixi/KiTest.kt +++ b/src/test/kotlin/io/kixi/core/KiTest.kt @@ -1,6 +1,6 @@ -package io.kixi +package io.kixi.core -import io.kixi.uom.Length +import io.kixi.core.uom.Length import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test @@ -26,4 +26,4 @@ class KiTest { assertEquals("Map?", MapDef(true, TypeDef.String, TypeDef.Int_N).toString()) assertEquals("Map>", MapDef(false, TypeDef.String, listDef).toString()) } -} \ No newline at end of file +} diff --git a/src/test/kotlin/io/kixi/RangeTest.kt b/src/test/kotlin/io/kixi/core/RangeTest.kt similarity index 98% rename from src/test/kotlin/io/kixi/RangeTest.kt rename to src/test/kotlin/io/kixi/core/RangeTest.kt index 2e55fb3..1ca9815 100644 --- a/src/test/kotlin/io/kixi/RangeTest.kt +++ b/src/test/kotlin/io/kixi/core/RangeTest.kt @@ -1,4 +1,4 @@ -package io.kixi +package io.kixi.core import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue @@ -89,4 +89,4 @@ class RangeTest { assertTrue(dr.contains(5.0)) assertTrue(dr.contains(0.0)) } -} \ No newline at end of file +} diff --git a/src/test/kotlin/io/kixi/TypeDefTest.kt b/src/test/kotlin/io/kixi/core/TypeDefTest.kt similarity index 96% rename from src/test/kotlin/io/kixi/TypeDefTest.kt rename to src/test/kotlin/io/kixi/core/TypeDefTest.kt index 0d982c2..2318b56 100644 --- a/src/test/kotlin/io/kixi/TypeDefTest.kt +++ b/src/test/kotlin/io/kixi/core/TypeDefTest.kt @@ -1,8 +1,8 @@ -package io.kixi +package io.kixi.core -import io.kixi.uom.Length -import io.kixi.uom.Quantity -import io.kixi.uom.Unit +import io.kixi.core.uom.Length +import io.kixi.core.uom.Quantity +import io.kixi.core.uom.Unit import org.junit.jupiter.api.Test import org.junit.jupiter.api.Assertions.* @@ -86,4 +86,4 @@ internal class TypeDefTest { assertTrue(mapOfMaps.matches(mapOf("nums" to mapOf('1' to 1, '2' to 2)))) assertFalse(mapOfMaps.matches(mapOf("nums" to mapOf('1' to "1", '2' to "2")))) } -} \ No newline at end of file +} diff --git a/src/test/kotlin/io/kixi/VersionTest.kt b/src/test/kotlin/io/kixi/core/VersionTest.kt similarity index 96% rename from src/test/kotlin/io/kixi/VersionTest.kt rename to src/test/kotlin/io/kixi/core/VersionTest.kt index 9a200a9..ff1ba53 100644 --- a/src/test/kotlin/io/kixi/VersionTest.kt +++ b/src/test/kotlin/io/kixi/core/VersionTest.kt @@ -1,6 +1,6 @@ -package io.kixi +package io.kixi.core -import io.kixi.text.ParseException +import io.kixi.core.text.ParseException import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertThrows import org.junit.jupiter.api.Assertions.assertTrue diff --git a/src/test/kotlin/io/kixi/text/TextTest.kt b/src/test/kotlin/io/kixi/core/text/TextTest.kt similarity index 97% rename from src/test/kotlin/io/kixi/text/TextTest.kt rename to src/test/kotlin/io/kixi/core/text/TextTest.kt index 3659dc4..eb4c759 100644 --- a/src/test/kotlin/io/kixi/text/TextTest.kt +++ b/src/test/kotlin/io/kixi/core/text/TextTest.kt @@ -1,4 +1,4 @@ -package io.kixi.text +package io.kixi.core.text import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue @@ -34,4 +34,4 @@ class TextTest { "with numbers") assertFalse("f-oo".isKiIdentifier(), "Identifiers can't contain dashes") } -} \ No newline at end of file +} diff --git a/src/test/kotlin/io/kixi/uom/QuantityTest.kt b/src/test/kotlin/io/kixi/core/uom/QuantityTest.kt similarity index 88% rename from src/test/kotlin/io/kixi/uom/QuantityTest.kt rename to src/test/kotlin/io/kixi/core/uom/QuantityTest.kt index 5172c0e..e7f170b 100644 --- a/src/test/kotlin/io/kixi/uom/QuantityTest.kt +++ b/src/test/kotlin/io/kixi/core/uom/QuantityTest.kt @@ -1,10 +1,10 @@ -package io.kixi.uom +package io.kixi.core.uom import org.junit.jupiter.api.Assertions.assertEquals -import io.kixi.uom.Quantity.Companion.length -import io.kixi.uom.Quantity.Companion.area -import io.kixi.uom.Quantity.Companion.volume -import io.kixi.uom.Quantity.Companion.mass +import io.kixi.core.uom.Quantity.Companion.length +import io.kixi.core.uom.Quantity.Companion.area +import io.kixi.core.uom.Quantity.Companion.volume +import io.kixi.core.uom.Quantity.Companion.mass import org.junit.jupiter.api.Test import java.math.BigDecimal