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

Skip to content
Snippets Groups Projects
Commit d95e730d authored by str4d's avatar str4d
Browse files

propagate from branch 'i2p.i2p' (head 707603fcdd707b7521d213a82287d64520e18d37)

            to branch 'i2p.i2p.str4d.test2' (head d44865c44b6a31ff2e3d5bf9a5e98a6f28d80e5b)
parents 670e56de 12ced03a
No related branches found
No related tags found
No related merge requests found
Showing
with 644 additions and 0 deletions
......@@ -8,6 +8,17 @@ Prerequisites to build from source:
Build environment must use a UTF-8 locale.
To build:
Full builds are not yet possible, but the command is:
./gradlew assemble
gradlew will download dependencies over the clearnet by default, including
Gradle itself. To download over Tor, create a gradle.properties file
containing:
systemProp.socksProxyHost=localhost
systemProp.socksProxyPort=9150
Old build system:
(This will be deprecated once the Gradle build system is fully functional)
On x86 systems do:
ant pkg
......
sourceSets {
main {
java {
srcDir 'src'
}
}
}
dependencies {
compile project(':core')
compile project(':apps:ministreaming')
}
apply plugin: 'war'
sourceSets {
main {
java {
srcDir 'java/src'
}
}
}
dependencies {
compile project(':core')
providedCompile project(':apps:jetty')
}
jar {
exclude { it.name == 'Servlet.class' }
}
war {
webXml = file('web.xml')
}
sourceSets {
main {
java {
srcDir 'src'
}
}
}
dependencies {
compile project(':core')
compile project(':router')
compile project(':installer')
}
apply plugin: 'war'
sourceSets {
main {
java {
srcDir 'java/src'
include 'org/klomp/snark/web/**'
}
}
jar {
java {
srcDir 'java/src'
exclude 'org/klomp/snark/web'
}
}
}
dependencies {
jarCompile project(':core')
jarCompile project(':apps:ministreaming')
providedCompile sourceSets.jar.output
providedCompile project(':apps:ministreaming')
providedCompile project(':apps:jetty')
}
task i2psnarkJar(type: Jar) {
from sourceSets.jar.output
manifest {
attributes 'Main-Class': 'org.klomp.snark.Snark'
attributes 'Class-Path': 'i2p.jar mstreaming.jar streaming.jar'
}
}
artifacts {
archives i2psnarkJar
}
war {
into '.icons', {
from 'icons'
}
webInf {
into 'classes/org/klomp/snark/web'
from 'mime.properties'
}
webXml = file('web.xml')
}
apply plugin: 'war'
sourceSets {
main {
java {
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 {
java {
srcDir 'java/test/junit'
}
}
}
dependencies {
jarCompile project(':core')
jarCompile project(':apps:ministreaming')
providedCompile sourceSets.jar.output
providedCompile project(':apps:jetty')
}
task i2ptunnelJar(type: Jar) {
from sourceSets.jar.output
manifest {
attributes 'Main-Class': 'net.i2p.i2ptunnel.I2PTunnel'
attributes 'Class-Path': 'i2p.jar mstreaming.jar'
}
}
artifacts {
archives i2ptunnelJar
}
war {
from 'jsp'
exclude 'jsp/web.xml'
webXml = file('jsp/web.xml')
}
archivesBaseName = 'jetty-i2p'
sourceSets {
main {
java {
srcDir 'java/src'
}
}
}
dependencies {
ext.jettyVersion = '8.1.17.v20150415'
compile project(':core')
compile 'commons-logging:commons-logging:1.0.4'
compile 'org.eclipse.jetty.orbit:javax.servlet.jsp:2.2.0.v201112011158'
compile 'org.eclipse.jetty:jetty-http:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-io:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-security:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-server:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-util:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-xml:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-continuation:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-deploy:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-jmx:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-rewrite:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-servlet:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-servlets:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-start:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-webapp:' + ext.jettyVersion
}
archivesBaseName = 'mstreaming'
sourceSets {
main {
java {
srcDir 'java/src'
}
}
test {
java {
srcDir 'java/test/junit'
}
}
}
dependencies {
compile project(':core')
}
configurations {
tests
}
task testJar(type: Jar) {
baseName = 'mstreaming-test'
dependsOn classes
from sourceSets.test.output
}
artifacts {
tests testJar
}
apply plugin: 'war'
sourceSets {
main {
java {
srcDir 'java/src'
}
}
}
dependencies {
compile project(':core')
compile project(':router')
compile project(':installer')
providedCompile project(':apps:desktopgui')
providedCompile project(':apps:systray')
providedCompile project(':apps:jetty')
providedCompile files('../jrobin/jrobin-1.5.9.1.jar')
}
jar {
manifest {
// Top level installer will rename to jrobin.jar
// DTG added in 0.8.4, not in the classpath for very old installs,
// before we changed wrapper.config to specify *
// very old installs don't have i2psnark,jstl,standard in the classpath...
// not added in WebAppConfiguration any more
// 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'
}
}
war {
from 'jsp'
// Remove classes from the classpath, they are in the jar.
// If we return to precompiling jsps this needs to change.
classpath = []
webXml = file('jsp/web.xml')
}
sourceSets {
main {
java {
srcDir 'java/src'
}
}
test {
java {
srcDir 'java/test'
}
}
}
dependencies {
compile project(':core')
compile project(':apps:ministreaming')
}
sourceSets {
main {
java {
srcDir 'java/src'
}
}
test {
java {
srcDir 'java/test/junit'
}
}
}
dependencies {
compile project(':core')
compile project(':apps:ministreaming')
testCompile project(path: ':apps:ministreaming', configuration: 'tests')
}
apply plugin: 'war'
sourceSets {
main {
java {
srcDir 'src/java/src'
}
}
}
dependencies {
compile project(':core')
providedCompile project(':apps:jetty')
}
war {
from 'src/jsp'
from 'src/index.html'
webXml = file('src/WEB-INF/web-template.xml')
}
apply plugin: 'war'
sourceSets {
main {
java {
srcDir 'src/src'
}
}
}
dependencies {
compile project(':core')
providedCompile project(':apps:jetty')
}
war {
from 'src'
exclude 'WEB-INF/web.xml'
exclude 'LICENSE'
exclude 'src'
exclude 'susimail.properties'
webInf {
into 'classes'
from 'src/susimail.properties'
}
webXml = file('src/WEB-INF/web.xml')
}
sourceSets {
main {
java {
srcDir 'java/src'
}
}
}
dependencies {
compile project(':core')
compile files('java/lib/systray4j.jar')
}
subprojects {
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.+'
}
sourceCompatibility = 1.6
jar {
manifest {
attributes 'Implementation-Version': '0.9.26-3'
}
}
}
//apply from: file('gradle/update.gradle')
archivesBaseName = 'i2p'
sourceSets {
main {
java {
srcDir 'java/src'
}
resources {
srcDir 'java/src'
include 'gnu/getopt/*.properties'
}
}
test {
java {
srcDir 'java/test/junit'
}
}
}
configurations {
tests
}
task testJar(type: Jar) {
baseName = 'i2p-test'
dependsOn classes
from sourceSets.test.output
}
artifacts {
tests testJar
}
task prepUpdateRouter(type: Copy) {
dependsOn ':core:jar', ':router:jar'
// Pass in paths as a closure, so they are not executed during configuration
from {[
project(':core').jar.archivePath,
project(':router').jar.archivePath
]}
into 'pkg-temp/lib'
}
task prepUpdateSmall(type: Copy) {
dependsOn prepUpdateRouter
dependsOn ':apps:ministreaming:jar', ':apps:streaming:jar'
dependsOn ':apps:routerconsole:jar', ':apps:i2ptunnel:i2ptunnelJar'
dependsOn ':apps:routerconsole:war', ':apps:i2ptunnel:war'
dependsOn ':apps:addressbook:war'
// Base dir
into 'pkg-temp'
into('lib') {
from {[
project(':apps:ministreaming').jar.archivePath,
project(':apps:streaming').jar.archivePath,
project(':apps:routerconsole').jar.archivePath,
project(':apps:i2ptunnel').i2ptunnelJar.archivePath,
]}
// pulled out of routerconsole.jar in 0.7.12, someday we can take out of updater
// name without version so we can overwrite if we upgrade
from('apps/jrobin/jrobin-1.5.9.1.jar') {
rename { 'jrobin.jar' }
}
}
into('webapps') {
from {[
project(':apps:routerconsole').war.archivePath,
project(':apps:i2ptunnel').war.archivePath,
project(':apps:addressbook').war.archivePath,
]}
}
}
task prepUpdate(type: Copy) {
dependsOn prepUpdateSmall
dependsOn ':apps:BOB:jar', ':apps:sam:jar'
dependsOn ':apps:i2psnark:i2psnarkJar', ':apps:systray:jar'
//dependsOn ':apps:desktopgui:jar'
dependsOn ':apps:susidns:war', ':apps:susimail:war'
dependsOn ':apps:i2psnark:war'
// Base dir
into 'pkg-temp'
into('lib') {
from {[
project(':apps:BOB').jar.archivePath,
project(':apps:sam').jar.archivePath,
project(':apps:i2psnark').i2psnarkJar.archivePath,
// include systray changes in 0.7.5
project(':apps:systray').jar.archivePath,
// removed from updater in 0.9
//project(':apps:desktopgui').jar.archivePath,
]}
// as of 0.7.12; someday, we can remove these from the updater
from 'apps/susidns/src/WEB-INF/lib/jstl.jar'
from 'apps/susidns/src/WEB-INF/lib/standard.jar'
}
into('webapps') {
from {[
project(':apps:susidns').war.archivePath,
project(':apps:susimail').war.archivePath,
project(':apps:i2psnark').war.archivePath,
]}
}
from('history.txt') {
filter(org.apache.tools.ant.filters.HeadFilter, lines:1500)
}
doLast {
String more = '\n\n----------------\n\nEARLIER HISTORY IS AVAILABLE IN THE SOURCE PACKAGE'
ant.concat(more, append: 'true', destfile: 'pkg-temp/history.txt')
}
}
File added
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip
gradlew 0 → 100755
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
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