Merge branch 'modify-project-settings' into master
This commit is contained in:
commit
c216f6dcc5
3 changed files with 15 additions and 12 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -31,9 +31,8 @@ hs_err_pid*
|
||||||
build
|
build
|
||||||
|
|
||||||
# Ignore gradle wrapper
|
# Ignore gradle wrapper
|
||||||
/gradle
|
gradlew
|
||||||
/gradlew
|
gradlew.bat
|
||||||
/gradlew.bat
|
|
||||||
|
|
||||||
# Ignore manual compilation results
|
# Ignore manual compilation results
|
||||||
/de/jotoho/
|
/de/jotoho/
|
||||||
|
|
|
@ -1,16 +1,24 @@
|
||||||
|
import java.io.ByteArrayOutputStream
|
||||||
|
import java.io.OutputStream
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// Apply the application plugin to add support for building a CLI application in Java.
|
// Apply the application plugin to add support for building a CLI application in Java.
|
||||||
application
|
application
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
// For generating fat jars
|
repositories {
|
||||||
id("com.github.johnrengelman.shadow") version "latest.release"
|
// Use Maven Central for resolving dependencies.
|
||||||
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun versionBanner(): String {
|
fun versionBanner(): String {
|
||||||
val os = org.apache.commons.io.output.ByteArrayOutputStream()
|
val os = ByteArrayOutputStream()
|
||||||
|
val devNull = OutputStream.nullOutputStream()
|
||||||
project.exec {
|
project.exec {
|
||||||
commandLine = "git describe --always --dirty".split(" ")
|
commandLine = "git describe --tags --always --dirty --abbrev".split(" ")
|
||||||
standardOutput = os
|
standardOutput = os
|
||||||
|
errorOutput = devNull
|
||||||
}
|
}
|
||||||
return String(os.toByteArray()).trim()
|
return String(os.toByteArray()).trim()
|
||||||
}
|
}
|
||||||
|
@ -18,11 +26,6 @@ fun versionBanner(): String {
|
||||||
group = "de.jotoho"
|
group = "de.jotoho"
|
||||||
version = versionBanner()
|
version = versionBanner()
|
||||||
|
|
||||||
repositories {
|
|
||||||
// Use Maven Central for resolving dependencies.
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
1
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
1
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
Loading…
Reference in a new issue