2021-10-17 15:57:48 +02:00
|
|
|
// 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'
|
|
|
|
|
2014-03-08 11:47:40 +01:00
|
|
|
description = """\
|
|
|
|
Smack core components."""
|
|
|
|
|
2018-05-09 19:44:10 +02:00
|
|
|
ext {
|
2019-05-06 22:06:13 +02:00
|
|
|
xmlUnitVersion = '2.6.2'
|
2018-05-09 19:44:10 +02:00
|
|
|
}
|
|
|
|
|
2014-03-08 11:47:40 +01:00
|
|
|
dependencies {
|
2019-05-06 22:06:13 +02:00
|
|
|
compile project(':smack-xmlparser')
|
2014-07-15 18:00:55 +02:00
|
|
|
compile "org.jxmpp:jxmpp-core:$jxmppVersion"
|
2015-02-14 17:15:02 +01:00
|
|
|
compile "org.jxmpp:jxmpp-jid:$jxmppVersion"
|
2018-04-24 21:41:31 +02:00
|
|
|
compile "org.minidns:minidns-core:$miniDnsVersion"
|
2020-04-11 21:59:21 +02:00
|
|
|
|
|
|
|
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.
|
2020-05-13 22:20:32 +02:00
|
|
|
testFixturesImplementation "org.bouncycastle:bcprov-jdk15on:${bouncyCastleVersion}"
|
2020-04-11 21:59:21 +02:00
|
|
|
testFixturesImplementation 'org.apache.commons:commons-lang3:3.10'
|
|
|
|
|
|
|
|
testFixturesApi "org.jxmpp:jxmpp-jid:$jxmppVersion:tests"
|
|
|
|
testFixturesApi "org.xmlunit:xmlunit-core:$xmlUnitVersion"
|
2019-05-07 18:51:52 +02:00
|
|
|
// 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
|
2020-04-11 21:59:21 +02:00
|
|
|
testFixturesApi "org.assertj:assertj-core:3.11.1"
|
|
|
|
testFixturesApi "org.xmlunit:xmlunit-assertj:$xmlUnitVersion"
|
|
|
|
testFixturesApi 'org.hamcrest:hamcrest-library:2.2'
|
2020-11-08 23:01:39 +01:00
|
|
|
testFixturesApi 'com.google.guava:guava:28.2-jre'
|
2014-03-08 11:47:40 +01:00
|
|
|
}
|
2014-05-05 09:59:21 +02:00
|
|
|
|
2014-03-08 11:47:40 +01:00
|
|
|
class CreateFileTask extends DefaultTask {
|
|
|
|
@Input
|
|
|
|
String fileContent
|
|
|
|
|
|
|
|
@OutputFile
|
|
|
|
File outputFile
|
|
|
|
|
|
|
|
@TaskAction
|
|
|
|
def createFile() {
|
|
|
|
outputFile.text = fileContent
|
|
|
|
}
|
|
|
|
}
|
2014-05-05 09:56:52 +02:00
|
|
|
|
2014-03-08 11:47:40 +01:00
|
|
|
task createVersionResource(type: CreateFileTask) {
|
2014-08-08 15:09:08 +02:00
|
|
|
fileContent = version + ' (' + gitCommit + ' ' + builtDate + ')'
|
2014-03-08 11:47:40 +01:00
|
|
|
outputFile = new File(projectDir, 'src/main/resources/org.jivesoftware.smack/version')
|
|
|
|
}
|
2014-05-05 09:56:52 +02:00
|
|
|
|
2014-03-08 11:47:40 +01:00
|
|
|
compileJava.dependsOn(createVersionResource)
|
2021-10-17 15:57:48 +02:00
|
|
|
|
|
|
|
jar {
|
|
|
|
bundle {
|
|
|
|
bnd(
|
|
|
|
'DynamicImport-Package': '*',
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|