Gradle deprecation fixes & upgrades (#1594)
* Fix Gradle deprecations By using test suites, we explicitely configure the relevant dependencies on the test sourceset. This is not done by merely configuring the test task. * Switch to maintained version of Shadow * Update to Gradle 8.14.2
This commit is contained in:
@@ -2,8 +2,15 @@ import org.gradle.jvm.tasks.Jar
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
// This interface is needed as a workaround to get an instance of ExecOperations
|
||||
interface Injected {
|
||||
@get:Inject
|
||||
val execOps: ExecOperations
|
||||
}
|
||||
|
||||
val currentShortRevision = ByteArrayOutputStream().use {
|
||||
exec {
|
||||
val execOps = objects.newInstance<Injected>().execOps
|
||||
execOps.exec {
|
||||
executable = "git"
|
||||
args = listOf("rev-parse", "HEAD")
|
||||
standardOutput = it
|
||||
|
Reference in New Issue
Block a user