switch to single source multiple jar approach

This commit is contained in:
zab2
2017-11-03 00:11:51 +00:00
parent ab69fab3e4
commit d3cdf3c7d7

View File

@ -4,15 +4,6 @@ sourceSets {
main { main {
java { java {
srcDir 'java/src' srcDir 'java/src'
include 'net/i2p/i2ptunnel/web/EditBean.java'
include 'net/i2p/i2ptunnel/web/IndexBean.java'
}
}
jar {
java {
srcDir 'java/src'
exclude 'net/i2p/i2ptunnel/web/EditBean.java'
exclude 'net/i2p/i2ptunnel/web/IndexBean.java'
} }
} }
test { test {
@ -23,23 +14,41 @@ sourceSets {
} }
dependencies { dependencies {
jarCompile project(':core') compile project(':core')
jarCompile project(':apps:ministreaming') compile project(':apps:ministreaming')
testCompile project(':apps:ministreaming')
providedCompile sourceSets.jar.output
providedCompile project(':apps:jetty') providedCompile project(':apps:jetty')
} }
task i2ptunnelJar(type: Jar) { task i2ptunnelJar(type: Jar) {
from sourceSets.jar.output from sourceSets.main.output
exclude '**/ui/*.class'
exclude '**/EditBean.class'
exclude '**/IndexBean.class'
manifest { manifest {
attributes 'Main-Class': 'net.i2p.i2ptunnel.I2PTunnel' attributes 'Main-Class': 'net.i2p.i2ptunnel.I2PTunnel'
attributes 'Class-Path': 'i2p.jar mstreaming.jar' attributes 'Class-Path': 'i2p.jar mstreaming.jar'
} }
} }
task tempBeansJar(type: Jar) {
from sourceSets.main.output
include '**/EditBean.class'
include '**/ui/*.class'
include '**/IndexBean.class'
baseName = 'temp-beans'
}
task uiJar(type: Jar) {
baseName = 'i2ptunnel-ui.jar'
from sourceSets.main.output
include '**/ui/*.class'
manifest {
attributes 'Class-Path' : 'i2p.jar mstreaming.jar i2ptunnel.jar'
}
}
artifacts { artifacts {
archives i2ptunnelJar archives i2ptunnelJar, tempBeansJar, uiJar
} }
war { war {
@ -47,3 +56,4 @@ war {
exclude 'jsp/web.xml' exclude 'jsp/web.xml'
webXml = file('jsp/web.xml') webXml = file('jsp/web.xml')
} }