diff --git a/build.gradle b/build.gradle index 43528885c..6eb426d20 100644 --- a/build.gradle +++ b/build.gradle @@ -73,63 +73,46 @@ tasks.withType(JavaCompile) { } dependencies { + // used by YaCy code // implementation project ('libbuild:J7Zip-modified') // support library in libbuild (fyi: downside groovy/gradle use internal *.class instead of *.jar = trouble in task packageDist) // implementation 'net.yacy.extlib:J7Zip-modified:1.02' // alternatively support library from mavenLocal() repo (use publishToMavenLocal in subproject first) implementation fileTree(dir: 'lib', include: 'J7Zip-modified.jar') // switched back to use local lib/jar for this one library (avoiding sub-project execution w/o need) - - implementation 'org.bouncycastle:bcmail-jdk15on:1.69' - implementation 'org.bouncycastle:bcpkix-jdk15on:1.69' - implementation 'org.bouncycastle:bcprov-jdk15on:1.69' - implementation 'org.bouncycastle:bcutil-jdk15on:1.69' - implementation 'net.sourceforge.jchardet:jchardet:1.0' - implementation 'org.apache.commons:commons-compress:1.21' - implementation 'commons-fileupload:commons-fileupload:1.4' - implementation 'org.apache.pdfbox:fontbox:2.0.15' - implementation 'com.google.guava:guava:25.1-jre' - implementation 'com.hazelcast:hazelcast:4.2' - implementation 'com.ibm.icu:icu4j:63.1' - implementation 'com.twelvemonkeys.imageio:imageio-bmp:3.3.2' - implementation 'com.twelvemonkeys.imageio:imageio-core:3.3.2' - implementation 'com.twelvemonkeys.imageio:imageio-metadata:3.3.2' - implementation 'com.twelvemonkeys.imageio:imageio-tiff:3.3.2' - implementation 'oro:oro:2.0.8' - implementation 'net.jthink:jaudiotagger:2.2.5' - implementation 'jcifs:jcifs:1.3.17' - implementation 'javax.servlet:javax.servlet-api:3.1.0' - implementation 'org.eclipse.jetty:jetty-client:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-continuation:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-deploy:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-http:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-io:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-jmx:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-proxy:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-security:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-server:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-servlet:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-servlets:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-util:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-webapp:9.4.35.v20201120' - implementation 'org.eclipse.jetty:jetty-xml:9.4.35.v20201120' - implementation 'com.jcraft:jsch:0.1.54' - implementation 'com.googlecode.json-simple:json-simple:1.1.1' - implementation 'net.arnx:jsonic:1.3.10' - implementation 'org.jsoup:jsoup:1.14.2' - implementation 'org.jwat:jwat-archive-common:1.1.1' - implementation 'org.jwat:jwat-common:1.1.1' - implementation 'org.jwat:jwat-gzip:1.1.1' - implementation 'org.jwat:jwat-warc:1.1.1' - implementation 'com.cybozu.labs:langdetect:1.1-20120112' - implementation 'com.drewnoakes:metadata-extractor:2.11.0' - implementation 'org.apache.pdfbox:pdfbox:2.0.15' - implementation 'org.apache.poi:poi:3.17' - implementation 'org.apache.poi:poi-scratchpad:3.17' - implementation 'org.apache.solr:solr-core:8.8.1' - implementation 'org.apache.solr:solr-solrj:8.8.1' - implementation 'org.locationtech.spatial4j:spatial4j:0.6' - implementation 'org.bitlet:weupnp:0.1.4' - implementation 'org.tukaani:xz:1.8' - - testImplementation('junit:junit:4.13.2') + implementation group: 'org.bouncycastle', name: 'bcmail-jdk15on', version: '1.69' + implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.21' + implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.4' + implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' + implementation group: 'com.hazelcast', name: 'hazelcast', version: '4.2' + implementation group: 'com.ibm.icu', name: 'icu4j', version: '63.1' + implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-bmp', version: '3.3.2' + implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-tiff',version: '3.3.2' + implementation group: 'net.jthink', name: 'jaudiotagger', version: '2.2.5' + implementation group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0' + implementation group: 'net.sourceforge.jchardet', name: 'jchardet', version: '1.0' + implementation group: 'jcifs', name: 'jcifs', version: '1.3.17' + implementation group: 'org.eclipse.jetty', name: 'jetty-http', version: '9.4.35.v20201120' + implementation group: 'org.eclipse.jetty', name: 'jetty-proxy', version: '9.4.35.v20201120' + implementation group: 'org.eclipse.jetty', name: 'jetty-security', version: '9.4.35.v20201120' + implementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.35.v20201120' + implementation group: 'org.eclipse.jetty', name: 'jetty-servlets', version: '9.4.35.v20201120' + implementation group: 'org.eclipse.jetty', name: 'jetty-util', version: '9.4.35.v20201120' + implementation group: 'org.eclipse.jetty', name: 'jetty-webapp', version: '9.4.35.v20201120' + implementation group: 'com.jcraft', name: 'jsch', version: '0.1.54' + implementation group: 'com.googlecode.json-simple',name: 'json-simple', version: '1.1.1' + implementation group: 'org.jsoup', name: 'jsoup', version: '1.14.3' + implementation group: 'org.jwat', name: 'jwat-warc', version: '1.1.1' + implementation group: 'com.cybozu.labs', name: 'langdetect', version: '1.1-20120112' + implementation group: 'com.drewnoakes', name: 'metadata-extractor', version: '2.11.0' + implementation group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.25' + implementation group: 'org.apache.poi', name: 'poi', version: '3.17' + implementation group: 'org.apache.poi', name: 'poi-scratchpad', version: '3.17' + implementation group: 'org.apache.solr', name: 'solr-core', version: '8.8.1' + implementation group: 'org.apache.solr', name: 'solr-solrj', version: '8.8.1' + implementation group: 'org.bitlet', name: 'weupnp', version: '0.1.4' + + // overwrite version for transient dependencies + implementation 'org.eclipse.jetty:jetty-client:9.4.35.v20201120' // for solrj + + testImplementation 'junit:junit:4.13.2' } // exclude some unused/not needed automatic dependency imports @@ -220,7 +203,7 @@ task compileHtrootServlets (dependsOn: ['jar']) { // construct path elements configurations.compileClasspath.each { pathelement (location: it) } } - javac (srcdir:'htroot', excludes:'processing/**', + javac (srcdir:'htroot', excludes:'processing/**', source:java.sourceCompatibility, target:java.targetCompatibility, debug:"true", debuglevel:"lines,vars,source", includeantruntime:"false", encoding:"UTF-8") { classpath (refid:'project.class.path') @@ -337,16 +320,10 @@ task copyDependenciesForDistribution { String instDir = "$buildDir/RELEASE/MAIN/" copy { // needed for legacy distribution file (task packageDist) - (fyi: gradle.distXxx includes it autom. in dist archive) - def destination = project.file(instDir + "lib") - from configurations.compileClasspath - eachFile { // prevent overwriting existing files - if (it.getRelativePath().getFile(destination).exists()) { - it.exclude() - } - } + from configurations.runtimeClasspath into instDir + "lib" } - copy { + copy { // add own jar (not included automatically) from 'lib' include 'yacycore.jar' into instDir + "lib" @@ -386,6 +363,7 @@ task packageDistTar (type : Tar, dependsOn : ['copyDependenciesForDistribution', // wrapper to create legacy distribution archives task packageDist (dependsOn : ['copyDependenciesForDistribution','packageDistZip','packageDistTar'],group:'distribution') { + description 'Create legacy distribution tar.gz and zip archives' // do a late copy of dependencies to dist lib directory to not interfere with standard distZip // 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) @@ -449,6 +427,7 @@ task prepNsis (type: Copy, dependsOn: ['prepYaCyProperties']) { // wrapper to run prepNsis task before nsis createInstaller, to copy some config files task distWinInstaller (dependsOn:['copyFilesToDistDir','copyDependenciesForDistribution','prepNsis','createInstaller'], group:'distribution') { + description 'Creates a Win installer distribution exe file' tasks.findByName('createInstaller').mustRunAfter 'prepNsis' }