1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-27 13:07:58 +01:00
Smack/smack-core/build.gradle

71 lines
2.2 KiB
Groovy
Raw Normal View History

// Note that this is also declared in the main build.gradle for
// subprojects, but since evaluationDependsOnChildren is enabled we
// need to declare it here too to have bundle{bnd{...}} available
apply plugin: 'biz.aQute.bnd.builder'
description = """\
Smack core components."""
2018-05-09 19:44:10 +02:00
ext {
xmlUnitVersion = '2.6.2'
2018-05-09 19:44:10 +02:00
}
dependencies {
api project(':smack-xmlparser')
api "org.jxmpp:jxmpp-core:$jxmppVersion"
api "org.jxmpp:jxmpp-jid:$jxmppVersion"
api "org.minidns:minidns-core:$miniDnsVersion"
testFixturesImplementation project(':smack-xmlparser-stax')
testFixturesImplementation project(':smack-xmlparser-xpp3')
// Bouncy Castle is setup by SmackTestSuite. We deliberately use
// 'implementation' here since there is no need to shadow it
// outside of the fixtures compilation classpath. That is, no test
// should ever setup Bouncy Castle as security provider explicitly.
2022-08-07 16:59:47 +02:00
testFixturesImplementation "org.bouncycastle:bcprov-jdk18on:${bouncyCastleVersion}"
testFixturesImplementation 'org.apache.commons:commons-lang3:3.10'
testFixturesApi "org.jxmpp:jxmpp-jid:$jxmppVersion:tests"
testFixturesApi "org.xmlunit:xmlunit-core:$xmlUnitVersion"
// Explictily add assertj-core which is a dependency of
// xmlunit-assertj, but gradle fails to resolves it with:
// Execution failed for task ':smack-core:compileTestJava'.
// > Could not resolve all files for configuration ':smack-core:testCompileClasspath'.
// > Could not find org.assertj:assertj-core:.
// Required by:
// project :smack-core > org.xmlunit:xmlunit-assertj:2.6.2
testFixturesApi "org.assertj:assertj-core:3.11.1"
testFixturesApi "org.xmlunit:xmlunit-assertj:$xmlUnitVersion"
testFixturesApi 'org.hamcrest:hamcrest-library:2.2'
testFixturesApi "com.google.guava:guava:${guavaVersion}"
}
class CreateFileTask extends DefaultTask {
@Input
String fileContent
@OutputFile
File outputFile
@TaskAction
def createFile() {
outputFile.text = fileContent
}
}
task createVersionResource(type: CreateFileTask) {
2014-08-08 15:09:08 +02:00
fileContent = version + ' (' + gitCommit + ' ' + builtDate + ')'
outputFile = new File(projectDir, 'src/main/resources/org.jivesoftware.smack/version')
}
compileJava.dependsOn(createVersionResource)
jar {
bundle {
bnd(
'DynamicImport-Package': '*',
)
}
}