mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01: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
8
bosh/build.gradle
Normal file
8
bosh/build.gradle
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
description = """\
|
||||||
|
Smack BOSH API.
|
||||||
|
This API is considered beta quality."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
compile 'org.igniterealtime.jbosh:jbosh:0.7.0'
|
||||||
|
}
|
210
build.gradle
210
build.gradle
|
@ -1,3 +1,5 @@
|
||||||
|
import org.gradle.plugins.signing.Sign
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
@ -31,6 +33,19 @@ allprojects {
|
||||||
'Implementation-GitRevision': ext.gitCommit,
|
'Implementation-GitRevision': ext.gitCommit,
|
||||||
'Bundle-Version': version)
|
'Bundle-Version': version)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gradle.taskGraph.whenReady { taskGraph ->
|
||||||
|
if (signingRequired && taskGraph.allTasks.any { it instanceof Sign }) {
|
||||||
|
// Use Java 6's console to read from the console (no good for a CI environment)
|
||||||
|
Console console = System.console()
|
||||||
|
console.printf '\n\nWe have to sign some things in this build.\n\nPlease enter your signing details.\n\n'
|
||||||
|
def password = console.readPassword('GnuPG Private Key Password: ')
|
||||||
|
|
||||||
|
allprojects { ext.'signing.password' = password }
|
||||||
|
|
||||||
|
console.printf '\nThanks.\n\n'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task javadocAll(type: Javadoc) {
|
task javadocAll(type: Javadoc) {
|
||||||
|
@ -171,174 +186,6 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(':core') {
|
|
||||||
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
|
|
||||||
}
|
|
||||||
task createVersionResource(type: CreateFileTask) {
|
|
||||||
fileContent = version
|
|
||||||
outputFile = new File(projectDir, 'src/main/resources/org.jivesoftware.smack/version')
|
|
||||||
}
|
|
||||||
compileJava.dependsOn(createVersionResource)
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':compression-jzlib') {
|
|
||||||
description = """\
|
|
||||||
Compression with jzlib
|
|
||||||
Allow to compress the XMPP stream with help of jzlib."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(path: ':core', configuration: 'compression')
|
|
||||||
compile 'com.jcraft:jzlib:1.1.3'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':resolver-dnsjava') {
|
|
||||||
description = """\
|
|
||||||
DNS SRV with dnsjava
|
|
||||||
Use dnsjava for DNS SRV lookups. For platforms that don't provide the
|
|
||||||
javax.naming API (e.g. Android)."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(path: ':core', configuration: 'dns')
|
|
||||||
compile 'dnsjava:dnsjava:2.1.1'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':resolver-javax') {
|
|
||||||
description = """\
|
|
||||||
DNS SRV with Java7
|
|
||||||
Use javax.naming for DNS SRV lookups. The javax.naming API is availabe in JavaSE
|
|
||||||
since Java7."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(path: ':core', configuration: 'dns')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':tcp') {
|
|
||||||
description = """\
|
|
||||||
Smack for standard XMPP connections over TCP."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':core')
|
|
||||||
testCompile project(':core').sourceSets.test.runtimeClasspath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':bosh') {
|
|
||||||
description = """\
|
|
||||||
Smack BOSH API.
|
|
||||||
This API is considered beta quality."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':core')
|
|
||||||
compile 'org.igniterealtime.jbosh:jbosh:0.7.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now the "real" Smack sub-projects
|
|
||||||
// Note that test dependencies (junit, …) are interfered from the sourceSet.test of the core sub-project
|
|
||||||
|
|
||||||
project(':extensions') {
|
|
||||||
description = """\
|
|
||||||
Smack extensions.
|
|
||||||
Classes and methods that implement support for the various XMPP XEPs
|
|
||||||
(Multi-User Chat, PubSub, …) and other XMPP extensions."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':core')
|
|
||||||
testCompile project(':core').sourceSets.test.runtimeClasspath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':experimental') {
|
|
||||||
description = """\
|
|
||||||
Smack experimental extensions.
|
|
||||||
Classes and methods for XEPs that are in status 'experimental' or that should
|
|
||||||
otherwise carefully considered for deployment. The API may change even
|
|
||||||
between patch versions."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':core')
|
|
||||||
compile project(':extensions')
|
|
||||||
testCompile project(':core').sourceSets.test.runtimeClasspath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':legacy') {
|
|
||||||
description = """\
|
|
||||||
Smack legacy extensions.
|
|
||||||
Usually XEPs in the state 'retracted', 'rejected', 'deprecated',
|
|
||||||
'obsolete' or in a long standing 'deferred' state."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':core')
|
|
||||||
compile project(':extensions')
|
|
||||||
testCompile project(':core').sourceSets.test.runtimeClasspath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':debug') {
|
|
||||||
description = """\
|
|
||||||
Smack GUI debugger.
|
|
||||||
Inspect the exchanged XMPP stanzas."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':core')
|
|
||||||
testCompile project(':core').sourceSets.test.runtimeClasspath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project(':jingle') {
|
|
||||||
description = """\
|
|
||||||
Smack Jingle API.
|
|
||||||
Warning: This API is beta, outdated and currenlty unmaintained."""
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':core')
|
|
||||||
compile project(':extensions')
|
|
||||||
compile 'javax.media:jmf:2.1.1e'
|
|
||||||
compile files('libs/jspeex-0.9.7-jfcom.jar', 'libs/jstun.jar', 'libs/Speex.jar')
|
|
||||||
testCompile project(':core').sourceSets.test.runtimeClasspath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
(subprojects - project(':core'))*.jar {
|
(subprojects - project(':core'))*.jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes('Bundle-SymbolicName': project.group + '-' + appendix,
|
attributes('Bundle-SymbolicName': project.group + '-' + appendix,
|
||||||
|
@ -359,33 +206,6 @@ subprojects*.uploadArchives {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import org.gradle.plugins.signing.Sign
|
|
||||||
gradle.taskGraph.whenReady { taskGraph ->
|
|
||||||
if (signingRequired && taskGraph.allTasks.any { it instanceof Sign }) {
|
|
||||||
// Use Java 6's console to read from the console (no good for a CI environment)
|
|
||||||
Console console = System.console()
|
|
||||||
console.printf '\n\nWe have to sign some things in this build.\n\nPlease enter your signing details.\n\n'
|
|
||||||
def password = console.readPassword('GnuPG Private Key Password: ')
|
|
||||||
|
|
||||||
allprojects { ext.'signing.password' = password }
|
|
||||||
|
|
||||||
console.printf '\nThanks.\n\n'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class CreateFileTask extends DefaultTask {
|
|
||||||
@Input
|
|
||||||
String fileContent
|
|
||||||
|
|
||||||
@OutputFile
|
|
||||||
File outputFile
|
|
||||||
|
|
||||||
@TaskAction
|
|
||||||
def createFile() {
|
|
||||||
outputFile.text = fileContent
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def getGitCommit() {
|
def getGitCommit() {
|
||||||
def dotGit = new File("$projectDir/.git")
|
def dotGit = new File("$projectDir/.git")
|
||||||
if (!dotGit.isDirectory()) return 'non-git build'
|
if (!dotGit.isDirectory()) return 'non-git build'
|
||||||
|
|
8
compression-jzlib/build.gradle
Normal file
8
compression-jzlib/build.gradle
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
description = """\
|
||||||
|
Compression with jzlib
|
||||||
|
Allow to compress the XMPP stream with help of jzlib."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(path: ':core', configuration: 'compression')
|
||||||
|
compile 'com.jcraft:jzlib:1.1.3'
|
||||||
|
}
|
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)
|
8
debug/build.gradle
Normal file
8
debug/build.gradle
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
description = """\
|
||||||
|
Smack GUI debugger.
|
||||||
|
Inspect the exchanged XMPP stanzas."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
testCompile project(':core').sourceSets.test.runtimeClasspath
|
||||||
|
}
|
11
experimental/build.gradle
Normal file
11
experimental/build.gradle
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
description = """\
|
||||||
|
Smack experimental extensions.
|
||||||
|
Classes and methods for XEPs that are in status 'experimental' or that should
|
||||||
|
otherwise carefully considered for deployment. The API may change even
|
||||||
|
between patch versions."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
compile project(':extensions')
|
||||||
|
testCompile project(':core').sourceSets.test.runtimeClasspath
|
||||||
|
}
|
11
extensions/build.gradle
Normal file
11
extensions/build.gradle
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
description = """\
|
||||||
|
Smack extensions.
|
||||||
|
Classes and methods that implement support for the various XMPP XEPs
|
||||||
|
(Multi-User Chat, PubSub, …) and other XMPP extensions."""
|
||||||
|
|
||||||
|
// Note that the test dependencies (junit, …) are inferred from the
|
||||||
|
// sourceSet.test of the core subproject
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
testCompile project(':core').sourceSets.test.runtimeClasspath
|
||||||
|
}
|
11
jingle/build.gradle
Normal file
11
jingle/build.gradle
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
description = """\
|
||||||
|
Smack Jingle API.
|
||||||
|
Warning: This API is beta, outdated and currenlty unmaintained."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
compile project(':extensions')
|
||||||
|
compile 'javax.media:jmf:2.1.1e'
|
||||||
|
compile files('libs/jspeex-0.9.7-jfcom.jar', 'libs/jstun.jar', 'libs/Speex.jar')
|
||||||
|
testCompile project(':core').sourceSets.test.runtimeClasspath
|
||||||
|
}
|
10
legacy/build.gradle
Normal file
10
legacy/build.gradle
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
description = """\
|
||||||
|
Smack legacy extensions.
|
||||||
|
Usually XEPs in the state 'retracted', 'rejected', 'deprecated',
|
||||||
|
'obsolete' or in a long standing 'deferred' state."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
compile project(':extensions')
|
||||||
|
testCompile project(':core').sourceSets.test.runtimeClasspath
|
||||||
|
}
|
9
resolver-dnsjava/build.gradle
Normal file
9
resolver-dnsjava/build.gradle
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
description = """\
|
||||||
|
DNS SRV with dnsjava
|
||||||
|
Use dnsjava for DNS SRV lookups. For platforms that don't provide the
|
||||||
|
javax.naming API (e.g. Android)."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(path: ':core', configuration: 'dns')
|
||||||
|
compile 'dnsjava:dnsjava:2.1.1'
|
||||||
|
}
|
8
resolver-javax/build.gradle
Normal file
8
resolver-javax/build.gradle
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
description = """\
|
||||||
|
DNS SRV with Java7
|
||||||
|
Use javax.naming for DNS SRV lookups. The javax.naming API is availabe in JavaSE
|
||||||
|
since Java7."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(path: ':core', configuration: 'dns')
|
||||||
|
}
|
7
tcp/build.gradle
Normal file
7
tcp/build.gradle
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
description = """\
|
||||||
|
Smack for standard XMPP connections over TCP."""
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
testCompile project(':core').sourceSets.test.runtimeClasspath
|
||||||
|
}
|
Loading…
Reference in a new issue