mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 04:22:05 +01:00
b5f9d4d7a3
This also removes the powermock dependency. Although powermock is a fine library, it currently prevents dropping Junit4. And since we only use the Whitebox API of powermock, this simply replaced powermock's Whitebox with our own.
56 lines
1.9 KiB
Groovy
56 lines
1.9 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"
|
|
|
|
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.
|
|
testFixturesImplementation 'org.bouncycastle:bcprov-jdk15on:1.64'
|
|
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'
|
|
}
|
|
|
|
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)
|