mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
89dc3a0e85
This commit marks an important milestone with the addition of the smack-android subproject. Smack is now able to run native on Android without requiring any modifications, which makes the aSmack build environment obsolete. It was necessary to redesign the code for SASL authentication to achieve this. Smack now comes with smack-sasl-provided for SASL implementations that do not rely on additional APIs like javax for platforms where those APIs are not available like Android.
75 lines
1.9 KiB
Groovy
75 lines
1.9 KiB
Groovy
description = """\
|
|
Smack core components."""
|
|
|
|
configurations {
|
|
compression
|
|
dns
|
|
sasl
|
|
}
|
|
|
|
dependencies {
|
|
compile 'xpp3:xpp3:1.1.4c'
|
|
compile "org.jxmpp:jxmpp-core:$jxmppVersion"
|
|
// compile "org.igniterealtime.jxmpp:jxmpp-jid:$jxmppVersion"
|
|
testCompile 'junit:junit:4.11'
|
|
testCompile 'xmlunit:xmlunit:1.5'
|
|
testCompile 'org.powermock:powermock-module-junit4:1.5.5'
|
|
testCompile 'org.powermock:powermock-api-mockito:1.5.5'
|
|
testCompile 'com.jamesmurty.utils:java-xmlbuilder:0.6'
|
|
}
|
|
|
|
task compressionJar(type: Jar) {
|
|
appendix = 'compression'
|
|
dependsOn classes
|
|
from sourceSets.main.output
|
|
include('org/jivesoftware/smack/compression/**')
|
|
include('org/jivesoftware/smack/SmackConfiguration.class')
|
|
}
|
|
|
|
task dnsJar(type: Jar) {
|
|
appendix = 'dns'
|
|
dependsOn classes
|
|
from sourceSets.main.output
|
|
include('org/jivesoftware/smack/util/dns/**')
|
|
include('org/jivesoftware/smack/util/DNSUtil.class')
|
|
include('org/jivesoftware/smack/initializer/**')
|
|
}
|
|
|
|
task saslJar(type: Jar) {
|
|
appendix = 'sasl'
|
|
dependsOn classes
|
|
from sourceSets.main.output
|
|
include('org/jivesoftware/smack/SASLAuthentication.class')
|
|
include('org/jivesoftware/smack/SmackException.class')
|
|
include('org/jivesoftware/smack/XMPPConnection.class')
|
|
include('org/jivesoftware/smack/sasl/**')
|
|
include('org/jivesoftware/smack/initializer/**')
|
|
include('org/jivesoftware/smack/util/StringUtils.class')
|
|
include('org/jivesoftware/smack/util/ByteUtils.class')
|
|
}
|
|
|
|
artifacts {
|
|
compression compressionJar
|
|
dns dnsJar
|
|
sasl saslJar
|
|
}
|
|
|
|
class CreateFileTask extends DefaultTask {
|
|
@Input
|
|
String fileContent
|
|
|
|
@OutputFile
|
|
File outputFile
|
|
|
|
@TaskAction
|
|
def createFile() {
|
|
outputFile.text = fileContent
|
|
}
|
|
}
|
|
|
|
task createVersionResource(type: CreateFileTask) {
|
|
fileContent = version + ' (' + gitCommit + ')'
|
|
outputFile = new File(projectDir, 'src/main/resources/org.jivesoftware.smack/version')
|
|
}
|
|
|
|
compileJava.dependsOn(createVersionResource)
|