Restructure folders

This commit is contained in:
Jonas Tobias Hopusch 2021-09-19 19:33:39 +02:00
parent 7f725b345c
commit 365a0c2a17
Failed to generate hash of commit
6 changed files with 10 additions and 32 deletions

View file

@ -1,16 +0,0 @@
/*
* This Kotlin source file was generated by the Gradle 'init' task.
*/
package de.jotoho.waituntil
import kotlin.test.Test
import kotlin.test.assertNotNull
class AppTest {
/*
@Test fun appHasAGreeting() {
val classUnderTest = App()
assertNotNull(classUnderTest.greeting, "app should have a greeting")
}
*/
}

View file

@ -6,6 +6,8 @@
* User Manual available at https://docs.gradle.org/7.2/userguide/building_java_projects.html * User Manual available at https://docs.gradle.org/7.2/userguide/building_java_projects.html
*/ */
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id("org.jetbrains.kotlin.jvm") version "1.+" id("org.jetbrains.kotlin.jvm") version "1.+"
@ -26,7 +28,7 @@ dependencies {
// Align versions of all Kotlin components // Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom")) implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin JDK 8 standard library. // Use the Kotlin standard library.
implementation("org.jetbrains.kotlin:kotlin-stdlib") implementation("org.jetbrains.kotlin:kotlin-stdlib")
// Use the Kotlin test library. // Use the Kotlin test library.
@ -41,7 +43,11 @@ java {
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17
} }
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>() { tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "17" kotlinOptions.jvmTarget = "17"
} }

View file

@ -8,4 +8,3 @@
*/ */
rootProject.name = "waituntil" rootProject.name = "waituntil"
include("app")

View file

@ -1,12 +1,11 @@
package de.jotoho.waituntil package de.jotoho.waituntil
import java.lang.Math
import java.time.Instant import java.time.Instant
import java.time.ZonedDateTime import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter import java.time.format.DateTimeFormatter
import java.time.format.FormatStyle import java.time.format.FormatStyle
import java.time.temporal.ChronoUnit import java.time.temporal.ChronoUnit
import java.util.TimeZone import java.util.*
public fun waitUntilTimeStamp(timestamp: ZonedDateTime) { public fun waitUntilTimeStamp(timestamp: ZonedDateTime) {
Thread.sleep(Math.max(Instant.now().until(timestamp, ChronoUnit.MILLIS), 0)) Thread.sleep(Math.max(Instant.now().until(timestamp, ChronoUnit.MILLIS), 0))

View file

@ -1,16 +1,6 @@
package de.jotoho.waituntil package de.jotoho.waituntil
import java.util.Locale import java.util.*
import java.time.format.DateTimeFormatter
import java.util.TimeZone
import java.time.Instant
import java.time.LocalTime
import java.time.LocalDate
import java.time.ZonedDateTime
import java.time.temporal.ChronoUnit
import de.jotoho.waituntil.waitUntilTimeStamp
import de.jotoho.waituntil.calculateAndAnnounceTargetTime
// This file contains the main function and other utility function necessary for interpreting the terminal arguments. // This file contains the main function and other utility function necessary for interpreting the terminal arguments.
// See README.md and LICENSE.md for license information // See README.md and LICENSE.md for license information