Get rid of MultiPlatform Code, pt 3. (Gradle JVM only)

This commit is contained in:
Oliver Rümpelein 2020-04-19 12:40:12 +02:00
parent b63f92535f
commit 6f028d6ec6
14 changed files with 30 additions and 40 deletions

View file

@ -1,42 +1,33 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
id("org.jetbrains.kotlin.multiplatform") kotlin("jvm")
application
} }
repositories { repositories {
mavenCentral() mavenCentral()
} }
group = "com.example"
group = "de.pheerai"
version = "0.0.1" version = "0.0.1"
apply(plugin = "maven-publish") java {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
}
kotlin { application {
jvm() mainClassName = "de.pheerai.rcdbquery.SampleKt"
}
sourceSets {
commonMain {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
commonTest {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
getByName("jvmMain") {
dependencies { dependencies {
implementation(kotlin("stdlib-jdk8")) implementation(kotlin("stdlib-jdk8"))
testImplementation(kotlin("test-junit"))
} }
}
getByName("jvmTest") { val compileKotlin: KotlinCompile by tasks
dependencies { compileKotlin.kotlinOptions {
implementation(kotlin("test")) freeCompilerArgs = listOf("-XXLanguage:+InlineClasses")
implementation(kotlin("test-junit"))
}
}
all {
languageSettings.enableLanguageFeature("InlineClasses")
}
}
} }

View file

@ -1,6 +1,6 @@
pluginManagement { pluginManagement {
plugins { plugins {
id("org.jetbrains.kotlin.multiplatform") version "1.3.61" kotlin("jvm") version "1.3.72"
} }
} }

View file

@ -1,5 +0,0 @@
package de.pheerai.rcdbquery
fun main() {
print(generateQueryUrl())
}

View file

@ -3,6 +3,10 @@ package de.pheerai.rcdbquery
import de.pheerai.rcdbquery.dataMappings.* import de.pheerai.rcdbquery.dataMappings.*
import de.pheerai.rcdbquery.dsl.* import de.pheerai.rcdbquery.dsl.*
fun main() {
print(generateQueryUrl())
}
fun generateQueryUrl() = rcdbQuery { fun generateQueryUrl() = rcdbQuery {
searchFor(SearchType.COASTER) searchFor(SearchType.COASTER)
searchTerm("Dragon") searchTerm("Dragon")