From 6dcb58a4b59ef4f0aadc92858c8bf7c7c322e826 Mon Sep 17 00:00:00 2001 From: reger24 Date: Sat, 22 Jan 2022 10:56:11 +0100 Subject: [PATCH] Configured Gradle javadoc, added distribution archive for portalsearch - in case it's really used separately with that most Ant build targets are available native in Gradle build (imho all targets we really need - see list of legacy Ant targets) - "readBuildProperties" = see no use - "init" = not needed (ant internal prop initialization) - "javadoc" = gradle-task javadoc - "compile-core" = gradle-task build - "compile-htroot" = gradle-task compileHtrootServlets - "compile" = gradle-task build - "all" = gradle-task build - "copyMain4Dist" = gradle-task packageDist - "compileTest" = gradle-task compileTestJava (std) - "test" = gradle-task test (std) - "dist" = gradle-task packageDist - "portalsearch" = gradle-task packagePortalsearch (is that file still used?) - "clean" = gradle-task clean (std) - "run" = gradle-task run (std) or shell - "run-single" = not needed (old stuff) - "debug" = won't gradleize ide or run - "stop" = just a shell script - "create-doc" = gradle-task javadoc - "distWinInstaller" = won't impl. external tool needed - "distMacApp" = won't impl. external tool needed - "deleteData" = hm, won't impl. use nomale system --- build.gradle | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/build.gradle b/build.gradle index 36acf219e..ec0d4a3b3 100644 --- a/build.gradle +++ b/build.gradle @@ -425,3 +425,33 @@ task packageDist (dependsOn : ['copyDependenciesForDistribution','packageDistZip // which includes the lib (and bin) directory by default (task copyDependenciesForDistribution) // actually if copied early (e.g. in task copyFilesToDistDir) final Gradle zip/tar archive has all files double in lib dir (believe it or not) } + +// configure Javadoc task +tasks.withType (Javadoc) { + destinationDir project.file("javadoc") + title = "YaCy " + version + " API Documentation" + failOnError = false + options.addStringOption("encoding","UTF-8" ) // or any reason to keep the old "iso-8859-1" ? + classpath = configurations.compileClasspath + includes = ['**/*.java'] +} + +// some legacy stuff packaged in separate archive +// archive in build/distributions +task packagePortalsearch { + ant { + tar(destfile:'build/distributions/yacy-portalsearch.tar.gz', compression:'gzip', defaultexcludes:'yes', longfile:'fail') { + tarfileset (dir:'htroot/portalsearch/', prefix:'yacy/portalsearch/') { + include(name:'**/*') + } + tarfileset (dir:'htroot/jquery/', prefix:'yacy/jquery/') { + include(name:'**/*') + } + tarfileset (dir:"htroot/yacy/ui/img-2", prefix:'yacy/ui/img-2/') { + include(name:"magnify.png") + include(name:"cancel_round.png") + include(name:"stop.png") + } + } + } +} \ No newline at end of file