I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Verified Commit 46fe1ba7 authored by zzz's avatar zzz
Browse files

Build: Gradle fixes

Add resources to jars and wars
remove .jsi and .jsp files from wars
remove classes that are in jars from the wars for apps that have both
compile jsps in routerconsole.war
build routerconsole.jar
parent 13bd5e49
No related branches found
No related tags found
No related merge requests found
...@@ -35,12 +35,18 @@ artifacts { ...@@ -35,12 +35,18 @@ artifacts {
} }
war { war {
into '.icons', { rootSpec.exclude('/org/klomp/snark/*.class')
from 'icons' rootSpec.exclude('/org/klomp/snark/bencode/**')
} rootSpec.exclude('/org/klomp/snark/comments/**')
rootSpec.exclude('/org/klomp/snark/dht/**')
rootSpec.exclude('/org/klomp/snark/standalone/**')
from ('resources', {
into ".resources"
})
webInf { webInf {
into 'classes/org/klomp/snark/web' into 'classes/org/klomp/snark/web'
from 'mime.properties' from 'mime.properties'
} }
webXml = file('web.xml') webXml = file('web.xml')
// TODO why is this in there? WEB-INF/lib/systray.jar
} }
...@@ -31,6 +31,16 @@ task i2ptunnelJar(type: Jar) { ...@@ -31,6 +31,16 @@ task i2ptunnelJar(type: Jar) {
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'
} }
from ('resources', {
into "net/i2p/i2ptunnel/resources"
})
from ('../routerconsole/jsp', {
include 'themes/console/*/*.css'
include 'themes/console/images/i2plogo.png'
include 'themes/console/images/favicon.ico'
include 'themes/console/images/itoopie_sm.png'
into "net/i2p/i2ptunnel/resources"
})
} }
task tempBeansJar(type: Jar) { task tempBeansJar(type: Jar) {
...@@ -56,7 +66,18 @@ artifacts { ...@@ -56,7 +66,18 @@ artifacts {
war { war {
from 'jsp' from 'jsp'
rootSpec.exclude('/net/i2p/i2ptunnel/*.class')
rootSpec.exclude('/net/i2p/i2ptunnel/access')
rootSpec.exclude('/net/i2p/i2ptunnel/irc')
rootSpec.exclude('/net/i2p/i2ptunnel/localServer')
rootSpec.exclude('/net/i2p/i2ptunnel/socks')
rootSpec.exclude('/net/i2p/i2ptunnel/streamr')
rootSpec.exclude('/net/i2p/i2ptunnel/udp')
rootSpec.exclude('/net/i2p/i2ptunnel/udpTunnel')
exclude 'jsp/web.xml' exclude 'jsp/web.xml'
exclude '*.jsi'
exclude '*.jsp'
webXml = file('jsp/web.xml') webXml = file('jsp/web.xml')
// FIXME why is this in there? WEB-INF/lib/mstreaming.jar
} }
...@@ -40,7 +40,9 @@ if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVe ...@@ -40,7 +40,9 @@ if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVe
test.dependsOn scalaTest test.dependsOn scalaTest
} }
jar { task consoleJar(type: Jar) {
from sourceSets.main.output
exclude 'net/i2p/router/web/helpers/**'
manifest { manifest {
// Top level installer will rename to jrobin.jar // Top level installer will rename to jrobin.jar
// DTG added in 0.8.4, not in the classpath for very old installs, // DTG added in 0.8.4, not in the classpath for very old installs,
...@@ -50,12 +52,28 @@ jar { ...@@ -50,12 +52,28 @@ jar {
// All new jetty 7 jars should have been in 0.9.6, added in 0.9.7 // All new jetty 7 jars should have been in 0.9.6, added in 0.9.7
attributes 'Class-Path': 'i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-util.jar jetty-webapp.jar' attributes 'Class-Path': 'i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-util.jar jetty-webapp.jar'
} }
from ('resources-news', {
into "net/i2p/router/news/resources"
})
}
artifacts {
archives consoleJar
} }
war { war {
rootSpec.exclude('/com/vuze/**/*')
rootSpec.exclude('/edu/internet2/**/*')
rootSpec.exclude('/net/i2p/router/news/*')
rootSpec.exclude('/net/i2p/router/sybil/*')
rootSpec.exclude('/net/i2p/router/update/*')
rootSpec.exclude('/net/i2p/router/web/*.class')
from 'jsp' from 'jsp'
// Remove classes from the classpath, they are in the jar. exclude 'jsp/web.xml'
// If we return to precompiling jsps this needs to change. exclude '*.jsi'
classpath = [] exclude '*.jsp'
webXml = file('jsp/web.xml') webXml = file('jsp/web.xml')
from ('resources', {
into "WEB-INF/classes/net/i2p/router/web/resources"
})
} }
...@@ -18,5 +18,16 @@ dependencies { ...@@ -18,5 +18,16 @@ dependencies {
war { war {
from 'src/jsp' from 'src/jsp'
from 'src/index.html' from 'src/index.html'
from ('src/js', {
into "js"
})
from ('src/svg', {
into "svg"
})
from ('src/themes', {
into "themes"
})
exclude '*.jsi'
exclude '*.jsp'
webXml = file('src/WEB-INF/web-template.xml') webXml = file('src/WEB-INF/web-template.xml')
} }
...@@ -73,6 +73,9 @@ jar { ...@@ -73,6 +73,9 @@ jar {
attributes 'Implementation-Title': 'I2P Java Core API' attributes 'Implementation-Title': 'I2P Java Core API'
attributes 'Main-Class': 'net.i2p.util.CommandLine' attributes 'Main-Class': 'net.i2p.util.CommandLine'
} }
from ('resources', {
into "net/i2p/util/resources"
})
} }
configurations { configurations {
......
...@@ -34,4 +34,7 @@ jar { ...@@ -34,4 +34,7 @@ jar {
// so people with very old wrapper.config files will still work with Jetty 6 // so people with very old wrapper.config files will still work with Jetty 6
attributes 'Class-Path': 'jetty-i2p.jar jetty-java5-threadpool.jar jetty-rewrite-handler.jar jetty-sslengine.jar jetty-start.jar jetty-util.jar' attributes 'Class-Path': 'jetty-i2p.jar jetty-java5-threadpool.jar jetty-rewrite-handler.jar jetty-sslengine.jar jetty-start.jar jetty-util.jar'
} }
from ('resources', {
into "net/i2p/router/util/resources"
})
} }
...@@ -15,3 +15,6 @@ include 'apps:susimail' ...@@ -15,3 +15,6 @@ include 'apps:susimail'
include 'core' include 'core'
include 'installer' include 'installer'
include 'router' include 'router'
// TODO
//include 'apps:i2pcontrol'
//include 'apps:imagegen'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment