Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions utbot-gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ plugins {

apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

configurations {
fetchInstrumentationJar
}

dependencies {
shadow gradleApi()
shadow localGroovy()

implementation project(":utbot-framework")
fetchInstrumentationJar project(path: ':utbot-instrumentation', configuration: 'instrumentationArchive')

implementation group: 'io.github.microutils', name: 'kotlin-logging', version: kotlin_logging_version
}
Expand All @@ -30,9 +35,22 @@ jar {
}
}

/**
* Shadow plugin unpacks the nested `utbot-instrumentation-<version>.jar`.
* But we need it to be packed. Workaround: double-nest the jar.
*/
task shadowBugWorkaround(type: Jar) {
destinationDir file('build/shadow-bug-workaround')
from(configurations.fetchInstrumentationJar) {
into "lib"
}
}

// Documentation: https://imperceptiblethoughts.com/shadow/
shadowJar {
archiveClassifier.set('')
minimize()
from shadowBugWorkaround
}

// no module metadata => no dependency on the `utbot-framework`
Expand Down