mirror of
https://github.com/2martens/tsw-timetable.git
synced 2026-10-17 07:57:55 +02:00
feat: Support CRUD functionality (#7)
The station search implementation only works via DB and is very slow. For a simple query, the answer takes about 1s or longer. That is 100 times slower than it should be. For now, however, this solution is adequate to achieve a first prototype that includes the core functionality. feat: Add station search
This commit is contained in:
@@ -7,9 +7,9 @@ tasks.withType<JavaCompile>().configureEach {
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
jvmArgs?.plusAssign("--enable-preview")
|
||||
jvmArgs.plusAssign("--enable-preview")
|
||||
}
|
||||
|
||||
tasks.withType<JavaExec>().configureEach {
|
||||
jvmArgs?.plusAssign("--enable-preview")
|
||||
jvmArgs.plusAssign("--enable-preview")
|
||||
}
|
||||
@@ -53,8 +53,10 @@ normalization.runtimeClasspath.metaInf {
|
||||
ignoreAttribute("Build-Timestamp")
|
||||
}
|
||||
|
||||
|
||||
|
||||
tasks.register("cleanLibs") {
|
||||
delete("${buildDir}/libs")
|
||||
delete("${layout.buildDirectory.get().asFile}/libs")
|
||||
}
|
||||
|
||||
tasks.build {
|
||||
|
||||
@@ -16,6 +16,6 @@ tasks.named("build") {
|
||||
}
|
||||
|
||||
tasks.register("cleanCache") {
|
||||
delete("${buildDir}/jib-cache")
|
||||
delete("${buildDir}/libs")
|
||||
delete("${layout.buildDirectory.get().asFile}/jib-cache")
|
||||
delete("${layout.buildDirectory.get().asFile}/libs")
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ val projectSourceCompatibility: String = rootProject.properties["projectSourceCo
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xjvm-default=all")
|
||||
freeCompilerArgs.addAll("-Xjvm-default=all", "-Xjsr305=strict")
|
||||
jvmTarget.set(JvmTarget.fromTarget(projectSourceCompatibility))
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,10 @@ apply(plugin="com.netflix.nebula.release")
|
||||
tasks.register("writeVersionProperties") {
|
||||
group = "version"
|
||||
mustRunAfter("release")
|
||||
outputs.file("$buildDir/version.properties")
|
||||
val directory = buildDir
|
||||
outputs.file("${layout.buildDirectory.get().asFile}/version.properties")
|
||||
val directory = layout.buildDirectory.get().asFile
|
||||
doLast {
|
||||
Files.createDirectories(directory.toPath())
|
||||
File("$buildDir/version.properties").writeText("VERSION=${project.version}\n")
|
||||
File("${layout.buildDirectory.get().asFile}/version.properties").writeText("VERSION=${project.version}\n")
|
||||
}
|
||||
}
|
||||
+7
-12
@@ -1,18 +1,16 @@
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.springframework.boot.gradle.tasks.bundling.BootJar
|
||||
import java.time.ZonedDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.time.format.DateTimeFormatter.ofPattern
|
||||
|
||||
plugins {
|
||||
id("org.springframework.boot")
|
||||
id("twomartens.java")
|
||||
id("twomartens.spring-boot-base")
|
||||
}
|
||||
|
||||
val libs = the<LibrariesForLibs>()
|
||||
|
||||
dependencies {
|
||||
implementation(platform(libs.spring.boot))
|
||||
|
||||
implementation(libs.bundles.spring.boot)
|
||||
testImplementation(libs.spring.boot.test)
|
||||
}
|
||||
@@ -37,13 +35,6 @@ val integrationTestImplementation: Configuration by configurations.getting {
|
||||
extendsFrom(configurations.testImplementation.get())
|
||||
}
|
||||
|
||||
configurations {
|
||||
configureEach {
|
||||
exclude(group = "org.springframework.boot", module = "spring-boot-starter-logging")
|
||||
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register<Test>("integrationTest") {
|
||||
systemProperty("junit.jupiter.execution.parallel.enabled", true)
|
||||
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
|
||||
@@ -76,5 +67,9 @@ tasks.jar {
|
||||
|
||||
springBoot {
|
||||
buildInfo()
|
||||
mainClass.set("de.twomartens.timetable.MainApplicationKt")
|
||||
mainClass.set(project.properties["mainClass"].toString())
|
||||
}
|
||||
|
||||
tasks.named<BootJar>("bootJar") {
|
||||
enabled = true
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.springframework.boot.gradle.tasks.bundling.BootJar
|
||||
|
||||
plugins {
|
||||
id("org.springframework.boot")
|
||||
id("twomartens.java")
|
||||
}
|
||||
|
||||
val libs = the<LibrariesForLibs>()
|
||||
|
||||
dependencies {
|
||||
implementation(platform(libs.spring.boot))
|
||||
implementation(libs.spring.boot.log4j)
|
||||
}
|
||||
|
||||
configurations {
|
||||
configureEach {
|
||||
exclude(group = "org.springframework.boot", module = "spring-boot-starter-logging")
|
||||
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named<BootJar>("bootJar") {
|
||||
enabled = false
|
||||
}
|
||||
+2
-2
@@ -1,13 +1,13 @@
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
|
||||
plugins {
|
||||
id("twomartens.spring-boot")
|
||||
id("twomartens.spring-boot-application")
|
||||
id("twomartens.spring-boot-cloud-base")
|
||||
}
|
||||
|
||||
val libs = the<LibrariesForLibs>()
|
||||
|
||||
dependencies {
|
||||
implementation(platform(libs.spring.cloud))
|
||||
implementation(libs.bundles.spring.boot.server)
|
||||
implementation(libs.spring.openapi)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
|
||||
plugins {
|
||||
id("twomartens.spring-boot-base")
|
||||
}
|
||||
|
||||
val libs = the<LibrariesForLibs>()
|
||||
|
||||
dependencies {
|
||||
implementation(platform(libs.spring.cloud))
|
||||
}
|
||||
Reference in New Issue
Block a user