@ -33,6 +33,14 @@ sourceSets {
srcDirs = [ 'test/java' ]
srcDirs = [ 'test/java' ]
}
}
}
}
/ *
htroot { // optional sourceset to have htroot servelets available / visible in development IDE
java {
srcDirs = [ 'htroot' ]
compileClasspath = configurations . compileClasspath + jar . outputs . files
}
}
* /
}
}
group = 'net.yacy'
group = 'net.yacy'
@ -195,7 +203,7 @@ compileJava.dependsOn(prepYaCyProperties) // must be executed before compile (du
// implement ant task to simulate old Ant build for htroot ,
// implement ant task to simulate old Ant build for htroot ,
// to avoid import of complete build . xml ( as currently used )
// to avoid import of complete build . xml ( as currently used )
task compileHtrootServlets ( dependsOn: [ 'jar' ] ) {
task compileHtrootServlets ( dependsOn: [ 'jar' ] ) {
if ( buildDir . exists ( ) ) { // prevent buildscript failing on prime build with fresh git clone due to javac error during gradle init
ant {
ant {
path ( id: 'project.class.path' ) {
path ( id: 'project.class.path' ) {
// place yacycore . jar on classpath ( not automatically done )
// place yacycore . jar on classpath ( not automatically done )
@ -209,8 +217,8 @@ task compileHtrootServlets (dependsOn: ['jar']) {
classpath ( refid: 'project.class.path' )
classpath ( refid: 'project.class.path' )
}
}
}
}
}
}
}
startScripts . dependsOn ( compileHtrootServlets )
// copy additional files into directory used to create distribution archive ( distZip / distTar )
// copy additional files into directory used to create distribution archive ( distZip / distTar )
task copyFilesToDistDir ( dependsOn : [ 'compileJava' , 'jar' , 'compileHtrootServlets' ] ) {
task copyFilesToDistDir ( dependsOn : [ 'compileJava' , 'jar' , 'compileHtrootServlets' ] ) {
@ -324,8 +332,7 @@ task copyDependenciesForDistribution {
into instDir + "lib"
into instDir + "lib"
}
}
copy { // add own jar ( not included automatically )
copy { // add own jar ( not included automatically )
from 'lib'
from jar . outputs . files
include 'yacycore.jar'
into instDir + "lib"
into instDir + "lib"
}
}
}
}
@ -381,7 +388,8 @@ tasks.withType (Javadoc) {
// some legacy stuff packaged in separate archive
// some legacy stuff packaged in separate archive
// archive in build / distributions
// archive in build / distributions
task packagePortalsearch {
task packagePortalsearch ( group: 'distribution' ) {
description 'Bundles the javascript portalsearch as *.tar.gz distribution'
ant {
ant {
tar ( destfile: 'build/distributions/yacy-portalsearch.tar.gz' , compression: 'gzip' , defaultexcludes: 'yes' , longfile: 'fail' ) {
tar ( destfile: 'build/distributions/yacy-portalsearch.tar.gz' , compression: 'gzip' , defaultexcludes: 'yes' , longfile: 'fail' ) {
tarfileset ( dir: 'htroot/portalsearch/' , prefix: 'yacy/portalsearch/' ) {
tarfileset ( dir: 'htroot/portalsearch/' , prefix: 'yacy/portalsearch/' ) {