}
tasks.register('fatJar', Jar) {
- archiveBaseName.set(project.name + "-all")
+ archiveFileName.set(project.name + ".jar")
manifest {
attributes(
"Main-Class": "net.pterodactylus.rhynodge.engine.Starter"
jvmArgs += "--add-opens=java.base/java.util=ALL-UNNAMED"
}
-tasks.register('createVersion') {
- processResources.dependsOn(createVersion)
+import org.ajoberstar.grgit.Grgit
+def createVersion() {
+ def gitRepo = Grgit.open(projectDir)
+ def version = gitRepo.describe()
+ println("created version dir: " + new File("src/generated/resources").mkdirs())
+ new File("src/generated/resources/version.txt").withWriter() { it.write(version) }
}
tasks.named("processGeneratedResources") {
- duplicatesStrategy = DuplicatesStrategy.INCLUDE
-}
-
-import org.ajoberstar.grgit.Grgit
-createVersion {
- doLast {
- def gitRepo = Grgit.open(projectDir)
- version = gitRepo.describe()
- new File("src/generated/resources").mkdirs()
- new File("src/generated/resources/version.txt").withWriter() { it.write(version) }
+ doFirst {
+ createVersion()
}
+ duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
jacoco {