1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-18 02:02:04 +01:00
Smack/smack-core/build.gradle
Florian Schmaus 4dd3800d82 Remove Bouncycastle as direct dependency
By not directly depending on Bouncycastle (BC), we avoid conflicts between
different bouncycastle versions. It is also part of the developers job
to take care that all required security primitives are available. If
they are provide by BC or some other security provider should not be
up to Smack to decide.

We now only add BC as test dependency to satisfy this requirement when
the unit tests are executed.
2020-03-13 16:58:45 +01:00

48 lines
1.5 KiB
Groovy

description = """\
Smack core components."""
ext {
xmlUnitVersion = '2.6.2'
}
dependencies {
compile project(':smack-xmlparser')
compile "org.jxmpp:jxmpp-core:$jxmppVersion"
compile "org.jxmpp:jxmpp-jid:$jxmppVersion"
compile "org.minidns:minidns-core:$miniDnsVersion"
testCompile project(':smack-xmlparser-stax')
testCompile project(':smack-xmlparser-xpp3')
testCompile "org.jxmpp:jxmpp-jid:$jxmppVersion:tests"
testCompile "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
testCompile "org.assertj:assertj-core:3.11.1"
testCompile "org.xmlunit:xmlunit-assertj:$xmlUnitVersion"
testCompile 'com.jamesmurty.utils:java-xmlbuilder:1.2'
testCompile 'org.bouncycastle:bcprov-jdk15on:1.64'
}
class CreateFileTask extends DefaultTask {
@Input
String fileContent
@OutputFile
File outputFile
@TaskAction
def createFile() {
outputFile.text = fileContent
}
}
task createVersionResource(type: CreateFileTask) {
fileContent = version + ' (' + gitCommit + ' ' + builtDate + ')'
outputFile = new File(projectDir, 'src/main/resources/org.jivesoftware.smack/version')
}
compileJava.dependsOn(createVersionResource)