Restructure folders
This commit is contained in:
parent
7f725b345c
commit
365a0c2a17
6 changed files with 10 additions and 32 deletions
|
@ -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")
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,4 +8,3 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rootProject.name = "waituntil"
|
rootProject.name = "waituntil"
|
||||||
include("app")
|
|
||||||
|
|
|
@ -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))
|
|
@ -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
|
Loading…
Reference in a new issue