forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head 707603fcdd707b7521d213a82287d64520e18d37)
to branch 'i2p.i2p.str4d.test2' (head d44865c44b6a31ff2e3d5bf9a5e98a6f28d80e5b)
This commit is contained in:
11
README.txt
11
README.txt
@ -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
|
||||
|
||||
|
12
apps/BOB/build.gradle
Normal file
12
apps/BOB/build.gradle
Normal file
@ -0,0 +1,12 @@
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'src'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
compile project(':apps:ministreaming')
|
||||
}
|
22
apps/addressbook/build.gradle
Normal file
22
apps/addressbook/build.gradle
Normal file
@ -0,0 +1,22 @@
|
||||
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')
|
||||
}
|
13
apps/desktopgui/build.gradle
Normal file
13
apps/desktopgui/build.gradle
Normal file
@ -0,0 +1,13 @@
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'src'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
compile project(':router')
|
||||
compile project(':installer')
|
||||
}
|
47
apps/i2psnark/build.gradle
Normal file
47
apps/i2psnark/build.gradle
Normal file
@ -0,0 +1,47 @@
|
||||
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')
|
||||
}
|
48
apps/i2ptunnel/build.gradle
Normal file
48
apps/i2ptunnel/build.gradle
Normal file
@ -0,0 +1,48 @@
|
||||
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')
|
||||
}
|
30
apps/jetty/build.gradle
Normal file
30
apps/jetty/build.gradle
Normal file
@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
30
apps/ministreaming/build.gradle
Normal file
30
apps/ministreaming/build.gradle
Normal file
@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
39
apps/routerconsole/build.gradle
Normal file
39
apps/routerconsole/build.gradle
Normal file
@ -0,0 +1,39 @@
|
||||
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')
|
||||
}
|
17
apps/sam/build.gradle
Normal file
17
apps/sam/build.gradle
Normal file
@ -0,0 +1,17 @@
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'java/src'
|
||||
}
|
||||
}
|
||||
test {
|
||||
java {
|
||||
srcDir 'java/test'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
compile project(':apps:ministreaming')
|
||||
}
|
18
apps/streaming/build.gradle
Normal file
18
apps/streaming/build.gradle
Normal file
@ -0,0 +1,18 @@
|
||||
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')
|
||||
}
|
20
apps/susidns/build.gradle
Normal file
20
apps/susidns/build.gradle
Normal file
@ -0,0 +1,20 @@
|
||||
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')
|
||||
}
|
27
apps/susimail/build.gradle
Normal file
27
apps/susimail/build.gradle
Normal file
@ -0,0 +1,27 @@
|
||||
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')
|
||||
}
|
12
apps/systray/build.gradle
Normal file
12
apps/systray/build.gradle
Normal file
@ -0,0 +1,12 @@
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'java/src'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
compile files('java/lib/systray4j.jar')
|
||||
}
|
21
build.gradle
Normal file
21
build.gradle
Normal file
@ -0,0 +1,21 @@
|
||||
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')
|
30
core/build.gradle
Normal file
30
core/build.gradle
Normal file
@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
78
gradle/update.gradle
Normal file
78
gradle/update.gradle
Normal file
@ -0,0 +1,78 @@
|
||||
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')
|
||||
}
|
||||
}
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
5
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
5
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
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
|
164
gradlew
vendored
Executable file
164
gradlew
vendored
Executable file
@ -0,0 +1,164 @@
|
||||
#!/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 "$@"
|
90
gradlew.bat
vendored
Normal file
90
gradlew.bat
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
22
installer/build.gradle
Normal file
22
installer/build.gradle
Normal file
@ -0,0 +1,22 @@
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'java/src'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
runtime files('lib/wrapper/all/wrapper.jar')
|
||||
}
|
||||
|
||||
jar {
|
||||
baseName 'utility'
|
||||
from project(':core').sourceSets.main.output
|
||||
include 'net/i2p/installer/**'
|
||||
include 'net/i2p/util/FileUtil.class'
|
||||
manifest {
|
||||
attributes 'Main-Class': 'net.i2p.installer.Main'
|
||||
}
|
||||
}
|
24
router/build.gradle
Normal file
24
router/build.gradle
Normal file
@ -0,0 +1,24 @@
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'java/src'
|
||||
}
|
||||
}
|
||||
test {
|
||||
java {
|
||||
srcDir 'java/test/junit'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
testCompile project(path: ':core', configuration: 'tests')
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
// 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'
|
||||
}
|
||||
}
|
1
settings.gradle
Normal file
1
settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
include 'core', 'router', 'installer', 'apps:ministreaming', 'apps:streaming', 'apps:desktopgui', 'apps:systray', 'apps:jetty', 'apps:routerconsole', 'apps:addressbook', 'apps:susidns', 'apps:susimail', 'apps:i2psnark', 'apps:i2ptunnel', 'apps:BOB', 'apps:sam'
|
Reference in New Issue
Block a user