Implement proper Java11 Library (modules and all)
This commit is contained in:
parent
1d2c7e1877
commit
2ef239ea45
6 changed files with 12 additions and 12 deletions
|
@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
application
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -17,14 +16,9 @@ java {
|
|||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
application {
|
||||
mainClassName = "de.pheerai.rcdbquery.SampleKt"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
|
||||
// testImplementation(kotlin("test-junit"))
|
||||
testImplementation("io.kotest:kotest-runner-junit5-jvm:4.0.5")
|
||||
testImplementation("io.kotest:kotest-assertions-core-jvm:4.0.5")
|
||||
}
|
||||
|
@ -33,6 +27,9 @@ tasks {
|
|||
withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = listOf("-XXLanguage:+InlineClasses")
|
||||
apiVersion = "1.3"
|
||||
languageVersion = "1.3"
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import de.pheerai.rcdbquery.dataMappings.searchType.SearchType
|
|||
import de.pheerai.rcdbquery.dataMappings.searchType.searchType
|
||||
import de.pheerai.rcdbquery.dataMappings.vendor.Vendor
|
||||
import de.pheerai.rcdbquery.dataMappings.vendor.vendors
|
||||
import de.pheerai.rcdbquery.dsl.*
|
||||
import de.pheerai.rcdbquery.dsl.rcdbQuery
|
||||
|
||||
fun main() {
|
||||
println(generateNameQueryUrl())
|
||||
|
|
|
@ -5,4 +5,3 @@ interface RcdbParamOption<out T> {
|
|||
val fullName: String
|
||||
val paramValue: T
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package de.pheerai.rcdbquery.dataMappings.page
|
|||
|
||||
import de.pheerai.rcdbquery.dsl.ParamsCollector
|
||||
|
||||
fun ParamsCollector.page(page: Int) = also { this[Page.staticParamName] =
|
||||
Page(page)
|
||||
fun ParamsCollector.page(page: Int) = also {
|
||||
this[Page.staticParamName] =
|
||||
Page(page)
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ enum class Status(
|
|||
override val fullName: String,
|
||||
override val paramValue: Int
|
||||
) : RcdbParamOption<Int> {
|
||||
SBNO("SBNO", "Standing, but not operating", 311),
|
||||
SBNO("SBNO", "Standing, but not operating", 311),
|
||||
OPERATING("Operating", "In operation", 93),
|
||||
UNDER_CONSTRUCTION("Under Construction", 310),
|
||||
STORED("Stored", "In storage", 312)
|
||||
|
@ -19,7 +19,7 @@ enum class Status(
|
|||
companion object {
|
||||
const val staticParamName = "st"
|
||||
|
||||
fun of(input: String) = when(input) {
|
||||
fun of(input: String) = when (input) {
|
||||
"SBNO" -> SBNO
|
||||
"Operating" -> OPERATING
|
||||
"Under Construction" -> UNDER_CONSTRUCTION
|
||||
|
|
3
src/main/kotlin/module-info.java
Normal file
3
src/main/kotlin/module-info.java
Normal file
|
@ -0,0 +1,3 @@
|
|||
module rcdbquery.main {
|
||||
requires kotlin.stdlib;
|
||||
}
|
Loading…
Reference in a new issue