Merge branch 'modify-project-settings' into master

This commit is contained in:
Jonas Tobias Hopusch 2022-01-28 02:12:22 +01:00
commit c216f6dcc5
Failed to generate hash of commit
3 changed files with 15 additions and 12 deletions

5
.gitignore vendored
View file

@ -31,9 +31,8 @@ hs_err_pid*
build
# Ignore gradle wrapper
/gradle
/gradlew
/gradlew.bat
gradlew
gradlew.bat
# Ignore manual compilation results
/de/jotoho/

View file

@ -1,16 +1,24 @@
import java.io.ByteArrayOutputStream
import java.io.OutputStream
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
application
java
}
// For generating fat jars
id("com.github.johnrengelman.shadow") version "latest.release"
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
fun versionBanner(): String {
val os = org.apache.commons.io.output.ByteArrayOutputStream()
val os = ByteArrayOutputStream()
val devNull = OutputStream.nullOutputStream()
project.exec {
commandLine = "git describe --always --dirty".split(" ")
commandLine = "git describe --tags --always --dirty --abbrev".split(" ")
standardOutput = os
errorOutput = devNull
}
return String(os.toByteArray()).trim()
}
@ -18,11 +26,6 @@ fun versionBanner(): String {
group = "de.jotoho"
version = versionBanner()
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

View file

@ -0,0 +1 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip