File: bytebuddy.gradle

package info (click to toggle)
byte-buddy 1.14.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,684 kB
  • sloc: java: 186,543; xml: 7,684; sh: 217; ansic: 101; makefile: 14
file content (30 lines) | stat: -rw-r--r-- 1,214 bytes parent folder | download | duplicates (2)
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")
        }
    }
}