Skip to content

Commit

Permalink
Fix Gradle issues (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi authored Aug 1, 2023
1 parent 6a3bb75 commit 222aa39
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions main/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import com.vanniktech.maven.publish.JavaLibrary
import com.vanniktech.maven.publish.JavadocJar
import kotlin.io.path.Path
import kotlin.io.path.createDirectories
import kotlin.io.path.writeText

plugins {
`java-library`
Expand Down Expand Up @@ -34,14 +37,18 @@ dependencies {

tasks {
val updateVersion by registering {
File("$projectDir/src/main/resources/com/sedmelluq/discord/lavaplayer/tools/version.txt").let {
it.parentFile.mkdirs()
val output = "$buildDir/resources/main/com/sedmelluq/discord/lavaplayer/tools/version.txt"
inputs.property("version", version)
outputs.file(output)

Path(output).let {
it.parent.createDirectories()
it.writeText(version.toString())
}
}

classes {
finalizedBy(updateVersion)
dependsOn(updateVersion)
}
}

Expand Down

0 comments on commit 222aa39

Please sign in to comment.