mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 18:29:45 +02:00
Move gradle subproject configuration into the subproject
This commit is contained in:
parent
45226080e6
commit
93eea8ab8d
12 changed files with 161 additions and 195 deletions
55
core/build.gradle
Normal file
55
core/build.gradle
Normal file
|
@ -0,0 +1,55 @@
|
|||
description = """\
|
||||
Smack core components."""
|
||||
|
||||
configurations {
|
||||
compression
|
||||
dns
|
||||
}
|
||||
dependencies {
|
||||
compile 'xpp3:xpp3:1.1.4c'
|
||||
testCompile 'junit:junit:4.+'
|
||||
testCompile 'xmlunit:xmlunit:1.5'
|
||||
testCompile 'org.powermock:powermock-module-junit4:1.5.+'
|
||||
testCompile 'org.powermock:powermock-api-mockito:1.5.+'
|
||||
testCompile 'com.jamesmurty.utils:java-xmlbuilder:0.6+'
|
||||
}
|
||||
jar {
|
||||
manifest {
|
||||
attributes('Bundle-SymbolicName': project.group)
|
||||
from sharedManifest
|
||||
}
|
||||
}
|
||||
task compressionJar(type: Jar) {
|
||||
appendix += '-compression'
|
||||
dependsOn classes
|
||||
from sourceSets.main.output
|
||||
include('org/jivesoftware/smack/compression/**')
|
||||
}
|
||||
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')
|
||||
}
|
||||
artifacts {
|
||||
compression compressionJar
|
||||
dns dnsJar
|
||||
}
|
||||
class CreateFileTask extends DefaultTask {
|
||||
@Input
|
||||
String fileContent
|
||||
|
||||
@OutputFile
|
||||
File outputFile
|
||||
|
||||
@TaskAction
|
||||
def createFile() {
|
||||
outputFile.text = fileContent
|
||||
}
|
||||
}
|
||||
task createVersionResource(type: CreateFileTask) {
|
||||
fileContent = version
|
||||
outputFile = new File(projectDir, 'src/main/resources/org.jivesoftware.smack/version')
|
||||
}
|
||||
compileJava.dependsOn(createVersionResource)
|
Loading…
Add table
Add a link
Reference in a new issue