Compare commits
No commits in common. "4ed83b63764c7367deb1b43c3acb95ce0ff2cd81" and "50f66b93c3928e8eaa10b6a3b23820b6ebb859a7" have entirely different histories.
4ed83b6376
...
50f66b93c3
|
|
@ -1,6 +1,7 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("maven-publish")
|
id("maven-publish")
|
||||||
|
id("com.gorylenko.gradle-git-properties") version "2.3.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.alttd"
|
group = "com.alttd"
|
||||||
|
|
@ -11,10 +12,14 @@ apply<JavaLibraryPlugin>()
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
languageVersion.set(JavaLanguageVersion.of(21))
|
languageVersion.set(JavaLanguageVersion.of(17))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gitProperties {
|
||||||
|
keys = listOf("git.commit.id", "git.commit.time")
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType<JavaCompile> {
|
withType<JavaCompile> {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
|
|
@ -38,7 +43,7 @@ tasks {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.alttd:Galaxy-API:1.21-R0.1-SNAPSHOT") {
|
compileOnly("com.alttd:Galaxy-API:1.20.4-R0.1-SNAPSHOT") {
|
||||||
isChanging = true
|
isChanging = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -26,6 +26,20 @@ public final class PlayerUtils extends JavaPlugin {
|
||||||
registerCommands();
|
registerCommands();
|
||||||
registerEvents();
|
registerEvents();
|
||||||
reloadConfigs();
|
reloadConfigs();
|
||||||
|
printVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void printVersion() {
|
||||||
|
Properties gitProps = new Properties();
|
||||||
|
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream("git.properties")) {
|
||||||
|
gitProps.load(inputStream);
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.severe("Unable to load git.properties, unknown version");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info("Git commit ID: %s".formatted(gitProps.getProperty("git.commit.id")));
|
||||||
|
logger.info("Git commit time: %s".formatted(gitProps.getProperty("git.commit.time")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user