Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Implement the Ant javac task to compile htroot direct in Gradle
reger244df29edd030d
diff --git a/build.gradle b/build.gradleindex 4f7af3156..11c0b89c0 100644--- a/build.gradle+++ b/build.gradle@@ -242,18 +242,23 @@ task prepYaCyProperties (type: Copy) {prepYaCyProperties.dependsOn(runGitComInf)compileJava.dependsOn(prepYaCyProperties) // must be executed before compile-/** ------------------------------------------------------------ * Settings during the migration from Ant to Gradle build- * importing Ant targets and to use them within this Gradle build- * until/where functionality has not been migrated yet- * ------------------------------------------------------------- */-// Import Ant build and prefix all task names with 'ant_' to prevent naming conflict with Gradle tasks.-ant.importBuild('build.xml') { antTaskName -> "ant_${antTaskName}".toString() }+// implement ant task to simulate old Ant build for htroot,+// to avoid import of complete build.xml (as currently used)+task compileHtrootServlets {-// Set group property for all Ant tasks.-tasks.matching { task -> task.name.startsWith('ant_') }*.group = 'Ant'--// include compile of htroot servlets in Gradle lifecycle somewhere after compileJava-startScripts.dependsOn("ant_gradle-compile-htroot")+ ant {+ path(id:'project.class.path') {+ // place yacycore.jar on classpath (not automatically done)+ pathelement (location: jar.archiveFile.get())+ // construct path elements+ configurations.compileClasspath.each { pathelement (location: it) }+ }+ javac (srcdir:'htroot', excludes:'processing/**',+ source:'1.8', target:'1.8',+ debug:"true", debuglevel:"lines,vars,source", includeantruntime:"false", encoding:"UTF-8") {+ classpath (refid:'project.class.path')+ }+ }+}+startScripts.dependsOn(compileHtrootServlets)diff --git a/build.xml b/build.xmlindex 84d4bf8b2..560bbb828 100644--- a/build.xml+++ b/build.xml@@ -330,20 +330,6 @@</javac></target>- <!-- this is a copy of compile-htroot without dependency on init (likely not needed)- and intended to support / to by used by gradle -->- <target name="gradle-compile-htroot" description="compile YaCy servlets">- <!-- compile htroot, htroot/yacy and htroot/htdocsdefault -->- <loadproperties srcFile="build.properties" />- <javac srcdir="${htroot}/"- excludes="processing/**"- source="${javacSource}" target="${javacTarget}"- debug="true" debuglevel="lines,vars,source" includeantruntime="false" encoding="UTF-8">- <classpath refid="project.class.path" />- <compilerarg value="-Xlint"/>- </javac>- </target>-<target name="compile" depends="compile-core, compile-htroot" description="compile YaCy core and YaCy servlets" /><target name="all" depends="compile">