Compare commits
No commits in common. "3566b52698cae72c8d3a8f0583e2a858968a920f" and "427f61e1c2edacafe1cbddeba9a1d3679ca4920a" have entirely different histories.
3566b52698
...
427f61e1c2
4 changed files with 8 additions and 33 deletions
|
@ -6,17 +6,8 @@ plugins {
|
||||||
id("com.github.johnrengelman.shadow") version "latest.release"
|
id("com.github.johnrengelman.shadow") version "latest.release"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun versionBanner(): String {
|
|
||||||
val os = org.apache.commons.io.output.ByteArrayOutputStream()
|
|
||||||
project.exec {
|
|
||||||
commandLine = "git describe --always --dirty".split(" ")
|
|
||||||
standardOutput = os
|
|
||||||
}
|
|
||||||
return String(os.toByteArray()).trim()
|
|
||||||
}
|
|
||||||
|
|
||||||
group = "de.jotoho"
|
group = "de.jotoho"
|
||||||
version = versionBanner()
|
version = "0.1.1"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// Use Maven Central for resolving dependencies.
|
// Use Maven Central for resolving dependencies.
|
||||||
|
@ -31,10 +22,9 @@ java {
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes(
|
attributes(
|
||||||
"Implementation-Title" to project.name,
|
"Implementation-Title" to "de.jotoho.waituntil",
|
||||||
"Implementation-Version" to project.version,
|
"Implementation-Version" to "${project.version}",
|
||||||
"Main-Class" to "de.jotoho.waituntil.Main",
|
"Main-Class" to "de.jotoho.waituntil.Main"
|
||||||
"Main-Module" to "de.jotoho.waituntil.main"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,5 +32,4 @@ tasks.jar {
|
||||||
application {
|
application {
|
||||||
// Define the main class for the application.
|
// Define the main class for the application.
|
||||||
mainClass.set("de.jotoho.waituntil.Main")
|
mainClass.set("de.jotoho.waituntil.Main")
|
||||||
mainModule.set("de.jotoho.waituntil.main")
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
* in the user manual at https://docs.gradle.org/7.2/userguide/multi_project_builds.html
|
* in the user manual at https://docs.gradle.org/7.2/userguide/multi_project_builds.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rootProject.name = "waituntil"
|
rootProject.name = "de.jotoho.waituntil"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package de.jotoho.waituntil;
|
package de.jotoho.waituntil;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import static de.jotoho.waituntil.GlobalConf.applicationOutputLanguage;
|
import static de.jotoho.waituntil.GlobalConf.applicationOutputLanguage;
|
||||||
|
|
||||||
|
@ -36,19 +35,8 @@ public final class Main {
|
||||||
}
|
}
|
||||||
} else if (options.contains("version")) {
|
} else if (options.contains("version")) {
|
||||||
final var thisPackage = Main.class.getPackage();
|
final var thisPackage = Main.class.getPackage();
|
||||||
final var appVersion = thisPackage.getImplementationVersion() != null
|
final var appVersion = thisPackage.getImplementationVersion() != null ? thisPackage.getImplementationVersion() :"UNKNOWN";
|
||||||
? thisPackage.getImplementationVersion()
|
System.out.println("de.jotoho.waituntil version " + appVersion);
|
||||||
: "version unknown";
|
|
||||||
System.out.println("waituntil " + appVersion);
|
|
||||||
System.out.println("""
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it under the terms of the
|
|
||||||
GNU General Public License as published by the Free Software Foundation, either version 3 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.""");
|
|
||||||
} else if (words.size() == 1) {
|
} else if (words.size() == 1) {
|
||||||
final var target = TimeCalculator.calculateAndAnnounceTargetTime(words.iterator().next());
|
final var target = TimeCalculator.calculateAndAnnounceTargetTime(words.iterator().next());
|
||||||
Sleep.waitUntilTimeStamp(target);
|
Sleep.waitUntilTimeStamp(target);
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
module de.jotoho.waituntil.main {
|
|
||||||
}
|
|
Loading…
Reference in a new issue