1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
ext.pom = new groovy.xml.XmlSlurper().parse(rootProject.file('pom.xml'))
ext.outerPom = new groovy.xml.XmlSlurper().parse(file('../pom.xml'))
ext.release = Boolean.getBoolean('net.bytebuddy.gradle.release')
group = pom.parent.groupId.text().toString()
version = pom.parent.version.text().toString()
description = pom.description.text().toString()
dependencies {
if (release) {
implementation group: 'net.bytebuddy', name: 'byte-buddy', version: version
} else {
// At this point, it is not given that any artifact from the Maven build can be found in a repository.
def location = new File("$rootDir/../byte-buddy/target/byte-buddy-${version}.jar").canonicalFile
logger.info("Relying on ${location.absolutePath} as Byte Buddy dependency")
if (location.exists()) {
implementation files(location.absolutePath)
} else {
logger.warn("${location.absolutePath} does not exist, can clean but not build project")
}
}
}
if (release) {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute module("net.bytebuddy:byte-buddy:${version}") using project(":mavenBridge")
}
}
}
|