I'm about to make changes to the ant build that require to also be done to the gradle build. However there is no active developer for gradle in the YaCy project right now. The motivation to introduce gradle was primarily to manage dependencies and not commit them to git anymore. This has been solved by using ivy. Additionally, there were (to my understanding) still open tasks to be completed for the gradle migration, e.g. the Windows build. I came to YaCy with the intention of packaging it for Debian. It is currently not feasible use gradle in Debian: "If you have a choice, we recommend to use a different build system like Ant or Maven which are better supported in Debian and are more stable when it comes to Debian Java packaging." -- https://wiki.debian.org/Java/Packaging/Gradle It seems Fedora has completely given up on packaging gradle. The last activity seems to be from 2017: https://bugzilla.redhat.com/show_bug.cgi?id=1191535 This commit also shows how many files are necessary for gradle while ant just needs build.xml and ivy.xml. It is also ironic that gradle was introduced here to get rid of binary files in Git (jars) but apparently gradle itself needs jar files in the repo to work.pull/490/head
parent
b661cc56d8
commit
4503b9e292
@ -1,494 +0,0 @@
|
||||
/** for possible future use or parcl (of native apps) - 2022-02-09 (see other commented out sections below)
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath "org.mini2Dx:parcl:1.8.0"
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'distribution'
|
||||
id 'maven-publish'
|
||||
id 'com.github.johnrengelman.shadow' version '7.1.2' // uberJar plugin
|
||||
id 'com.github.langmo.gradlensis' version '0.1.0' // NSIS plugin
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'application'
|
||||
/** apply plugin: "org.mini2Dx.parcl" // for possible future use parcl - 2022-02-09 */
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs = ['source']
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
java {
|
||||
srcDirs = ['test/java']
|
||||
}
|
||||
}
|
||||
|
||||
htroot { // optional sourceset to have htroot servelets available/visible in development IDE
|
||||
java {
|
||||
srcDirs = ['htroot']
|
||||
exclude 'processing/**'
|
||||
compileClasspath = configurations.compileClasspath + jar.outputs.files
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
group = 'net.yacy'
|
||||
version = '1.925'
|
||||
description = 'YaCy Search Server'
|
||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
java.targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
mainClassName = "net.yacy.yacy"
|
||||
// applicationDefaultJvmArgs = ["-Xmx1024m"] // // limit memory use (below gradle default)
|
||||
|
||||
// create property store for filterTokens (here, to make sure it exist)
|
||||
project.ext.filterTokens = new Properties()
|
||||
|
||||
/** for possible future use of parcl - 2022-02-09
|
||||
parcl {
|
||||
exe {
|
||||
exeName = "YaCy"
|
||||
}
|
||||
|
||||
app {
|
||||
vmArgs = ["-Xmx1g"]
|
||||
appName = "YaCy"
|
||||
icon = "addon/YaCy.icns"
|
||||
applicationCategory = "Search-Engine"
|
||||
displayName = 'YaCy Search Engine'
|
||||
identifier = 'net.yacy'
|
||||
copyright = 'Copyright 2021 Michael Peter Christen et al.'
|
||||
zipName = 'YaCy.zip'
|
||||
}
|
||||
|
||||
linux {
|
||||
binName = "YaCy"
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
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.0.2' // alternatively support library from mavenLocal() repo (use publishToMavenLocal in subproject first)
|
||||
implementation fileTree(dir: 'lib', include: 'J7Zip-modified-1.0.2.jar') // switched back to use local lib/jar for this one library (avoiding sub-project execution w/o need)
|
||||
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.4'
|
||||
implementation group: 'com.ibm.icu', name: 'icu4j', version: '63.1'
|
||||
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-bmp', version: '3.8.1'
|
||||
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-tiff',version: '3.8.1'
|
||||
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
|
||||
implementation 'org.tukaani:xz:1.9' // commons.compress.compressors.xz uses this, but declares it as optional dependency
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
}
|
||||
|
||||
// exclude some unused/not needed automatic dependency imports
|
||||
configurations.implementation {
|
||||
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
||||
exclude group: 'org.eclipse.jetty', module: 'jetty-alpn-client'
|
||||
exclude group: 'org.eclipse.jetty', module: 'jetty-alpn-java-client'
|
||||
exclude group: 'org.eclipse.jetty', module: 'jetty-alpn-java-server'
|
||||
exclude group: 'org.eclipse.jetty', module: 'jetty-alpn-server'
|
||||
// warning 'Class path contains multiple SLF4J bindings'
|
||||
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
|
||||
}
|
||||
|
||||
// configure jar
|
||||
jar {
|
||||
archiveFileName = 'yacycore.jar'
|
||||
manifest {
|
||||
attributes(
|
||||
"Main-Class": mainClassName ,
|
||||
"Class-Path": configurations.runtimeClasspath.collect { it.name }.join(' ')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar.zip64 = true // saw build error: Execution failed for task ':shadowJar'. shadow.org.apache.tools.zip.Zip64RequiredException: archive contains more than 65535 entries.
|
||||
|
||||
// prepare yacyBuildProperties.java from template (needed after commits or new versions)
|
||||
// read values from property file generated by storeGitComInf tool
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
task prepYaCyProperties (type: Copy) {
|
||||
inputs.files('gitbuildnumber.properties', sourceSets.main.java.srcDirs[0].name + "/net/yacy/peers/operation/yacyBuildProperties.java.template")
|
||||
|
||||
def propfile = "gitbuildnumber.properties";
|
||||
if (project.file(propfile).exists()) { // must check otherwise any action may stop after clean on this error
|
||||
file("gitbuildnumber.properties").withReader {
|
||||
Properties props = new Properties()
|
||||
props.load(it)
|
||||
project.ext.filterTokens.putAll(props)
|
||||
}
|
||||
} else { // on missing properties file use generic data
|
||||
logger.error("prepYaCyProperties: file " + propfile + " is missing, you should re-run storeGitComInf")
|
||||
Properties props = new Properties()
|
||||
String Dstr = new Date().format("yyyyMMDD")
|
||||
String Tstr = new Date().format("yyyyMMDD-HHmmss")
|
||||
props.put("branch","-dev")
|
||||
props.put ("REPL_DATE",Dstr)
|
||||
props.put ("REPL_REVISION_NR",Tstr)
|
||||
project.ext.filterTokens.putAll(props)
|
||||
}
|
||||
|
||||
String fdirname = sourceSets.main.java.srcDirs[0].name + '/net/yacy/peers/operation'
|
||||
from fdirname
|
||||
include('yacyBuildProperties.java.template')
|
||||
rename 'yacyBuildProperties.java.template', 'yacyBuildProperties.java'
|
||||
filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: project.ext.filterTokens)
|
||||
filter(ReplaceTokens, tokens: [REPL_VERSION: project.version, REPL_PKGMANAGER:"false", REPL_RESTARTCMD: "/etc/init.d/yacy restart"]) // gradle.project.version + some defaults from ant
|
||||
into (fdirname)
|
||||
|
||||
}
|
||||
compileJava.dependsOn(prepYaCyProperties) // must be executed before compile (due to source template filtering)
|
||||
|
||||
// implement ant task to simulate old Ant build for htroot,
|
||||
// to avoid import of complete build.xml (as currently used)
|
||||
task compileHtrootServlets (dependsOn: ['jar']) {
|
||||
inputs.files(fileTree('htroot') { // allow lifecycle UP-TO-DATE even with doLast block
|
||||
include '**/*.java'
|
||||
include '**/*.class' // to detect missing class file
|
||||
exclude 'processing/**'
|
||||
})
|
||||
outputs.files(fileTree('htroot') {
|
||||
include '**/*.class'
|
||||
})
|
||||
|
||||
doLast{
|
||||
if (file(jar.archiveFile).exists()) { // prevent buildscript failing on prime build with fresh git clone due to javac error during gradle init
|
||||
// logger.warn("if java files changed in source AND htroot at the same time and build fails during 'Configure project' with javac error -> delete build/libs/yacycore.jar or build directory once")
|
||||
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:java.sourceCompatibility, target:java.targetCompatibility,
|
||||
debug:"true", debuglevel:"lines,vars,source", includeantruntime:"false", encoding:"UTF-8") {
|
||||
classpath (refid:'project.class.path')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// copy additional files into directory used to create distribution archive (distZip/distTar)
|
||||
task copyFilesToDistDir (type: Copy, dependsOn : ['jar', 'compileHtrootServlets']) {
|
||||
String instDir = "$buildDir/RELEASE/MAIN/"
|
||||
|
||||
from projectDir
|
||||
include 'addon/**'
|
||||
include 'bin/**'
|
||||
include 'defaults/**'
|
||||
include 'examples/**'
|
||||
include 'gradle/**'
|
||||
include 'htroot/**'
|
||||
include 'langdetect/**'
|
||||
// include 'lib/**' // do not copy old ant lib, gradle dependencies will be copied into lib by task copy copyDependenciesForDistribution
|
||||
include 'libbuild/**'
|
||||
include 'locales/**'
|
||||
include 'skins/**'
|
||||
include 'source/**'
|
||||
// include 'vocabularies/**' // not included in prev releases
|
||||
|
||||
include '*.bat'
|
||||
include '*.sh'
|
||||
include 'gradlew'
|
||||
include 'AUTHORS'
|
||||
include 'COPYRIGHT'
|
||||
include 'NOTICE'
|
||||
include 'readme.txt'
|
||||
include 'ChangeLog'
|
||||
include 'gpl.txt'
|
||||
include 'yacy.yellow'
|
||||
include '*.properties'
|
||||
include 'build.gradle'
|
||||
include 'settings.gradle'
|
||||
include 'build.xml'
|
||||
|
||||
exclude '**/build/**'
|
||||
exclude '**/target/**'
|
||||
|
||||
into instDir
|
||||
}
|
||||
|
||||
distZip.dependsOn(copyFilesToDistDir)
|
||||
distTar.dependsOn(copyFilesToDistDir)
|
||||
|
||||
// declare distribution source directory to be added to archives
|
||||
distributions {
|
||||
main {
|
||||
// Gradle appends always the version to the BaseName so this doesn't work,
|
||||
// legacy archive name must be archieved by file rename
|
||||
//
|
||||
// String Dst = project.ext.filterTokens.get('REPL_DATE')
|
||||
// String rNr = project.ext.filterTokens.get('REPL_REVISION_NR')
|
||||
// String branch = project.ext.filterTokens.get('branch')
|
||||
//
|
||||
// distributionBaseName = 'yacy' + branch + '_v' + project.version + '_' + Dst + '_' + rNr
|
||||
|
||||
contents { // fyi: content completed by copyFilesToDistDir
|
||||
from "${buildDir}/RELEASE/MAIN"
|
||||
exclude "lib/**" // lib dir is only for packageDist created
|
||||
// define unix/linux file permission
|
||||
eachFile { file ->
|
||||
if(file.getName().endsWith(".sh")) {
|
||||
file.setMode(0755)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// configure distTar archive name
|
||||
tasks.findByName('assembleDist').dependsOn('prepYaCyProperties') // make sure poperties are loaded before distTar/distZip
|
||||
distTar {
|
||||
compression 'GZIP'
|
||||
archiveExtension = 'tar.gz'
|
||||
String Dst = project.ext.filterTokens.get('REPL_DATE')
|
||||
String rNr = project.ext.filterTokens.get('REPL_REVISION_NR')
|
||||
String branch = project.ext.filterTokens.get('branch')
|
||||
archiveVersion = '' // important as otherwise version is added automatically again to the end of archiveBaseName
|
||||
archiveBaseName = 'yacy' + branch + '_v' + project.version + '_' + Dst + '_' + rNr // important to use project.version otherwise depreciated distZip.version is used (wich is now '')
|
||||
}
|
||||
|
||||
// configure distZip archive name
|
||||
distZip {
|
||||
String Dst = project.ext.filterTokens.get('REPL_DATE')
|
||||
String rNr = project.ext.filterTokens.get('REPL_REVISION_NR')
|
||||
String branch = project.ext.filterTokens.get('branch')
|
||||
archiveVersion = '' // important as otherwise version is added automatically again to the end of archiveBaseName
|
||||
archiveBaseName = 'yacy' + branch + '_v' + project.version + '_' + Dst + '_' + rNr // important to use project.version otherwise depreciated distZip.version is used (wich is now '')
|
||||
}
|
||||
|
||||
// copy runtime dependencies (jar) to the distribution directory
|
||||
task copyDependenciesForDistribution (type: Copy) {
|
||||
// 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
|
||||
// actually if copied early (e.g. task copyFilesToDistDir) final Gradle zip/tar archive has all files double in lib dir (believe it or not)
|
||||
|
||||
String instDir = "$buildDir/RELEASE/MAIN/"
|
||||
// needed for legacy distribution file (task packageDist) - (fyi: gradle.distZip/Tar includes it autom. in dist archive)
|
||||
from configurations.runtimeClasspath
|
||||
from jar.outputs.files // add own jar (not included automatically)
|
||||
into instDir + "lib"
|
||||
}
|
||||
|
||||
// create a legacy distribution zip archive
|
||||
task packageDistZip (type : Zip, dependsOn : ['copyDependenciesForDistribution','copyFilesToDistDir','prepYaCyProperties'] ) {
|
||||
|
||||
String Dst = project.ext.filterTokens.get('REPL_DATE')
|
||||
String rNr = project.ext.filterTokens.get('REPL_REVISION_NR')
|
||||
String branch = project.ext.filterTokens.get('branch')
|
||||
String destName = 'yacy' + branch + '_v' + project.version + '_' + Dst + '_' + rNr + '.' + archiveExtension.get()
|
||||
|
||||
archiveFileName = destName
|
||||
destinationDirectory = layout.buildDirectory.dir('distributions/legacyDistFiles')
|
||||
|
||||
from layout.buildDirectory.dir("RELEASE/MAIN")
|
||||
into 'yacy'
|
||||
}
|
||||
|
||||
// create a legacy distribution gz/tar archive
|
||||
task packageDistTar (type : Tar, dependsOn : ['copyDependenciesForDistribution','copyFilesToDistDir','prepYaCyProperties']) {
|
||||
|
||||
compression 'GZIP'
|
||||
String Dst = project.ext.filterTokens.get('REPL_DATE')
|
||||
String rNr = project.ext.filterTokens.get('REPL_REVISION_NR')
|
||||
String branch = project.ext.filterTokens.get('branch')
|
||||
String destName = 'yacy' + branch + '_v' + project.version + '_' + Dst + '_' + rNr + '.tar.gz' // ! Gradle would use ext .tgz (archiveExtension.get())
|
||||
|
||||
archiveFileName = destName
|
||||
destinationDirectory = layout.buildDirectory.dir('distributions/legacyDistFiles')
|
||||
from layout.buildDirectory.dir("RELEASE/MAIN")
|
||||
fileMode 0644
|
||||
eachFile { file ->
|
||||
if(file.getName().endsWith(".sh")) {
|
||||
file.setMode(0755)
|
||||
}
|
||||
}
|
||||
into 'yacy'
|
||||
}
|
||||
|
||||
// wrapper to create legacy distribution archives
|
||||
task packageDist (dependsOn : ['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)
|
||||
}
|
||||
|
||||
// configure Javadoc task
|
||||
tasks.withType (Javadoc) {
|
||||
destinationDir project.file("javadoc")
|
||||
title = "YaCy " + project.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 (group:'distribution') {
|
||||
description 'Bundles the javascript portalsearch as *.tar.gz distribution'
|
||||
ant {
|
||||
tar(destfile:"${buildDir}/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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration of gradle-nsis plugin.
|
||||
nsis {
|
||||
// path to the NSIS configuration file
|
||||
configuration = file("${buildDir}/RELEASE/WINDOWS/build.nsi")
|
||||
// folder where the NSIS installer generator is run. All paths
|
||||
// in the NSIS configuration file are relative to this folder.
|
||||
runIn = file("${buildDir}")
|
||||
}
|
||||
|
||||
// prepare the NSIS build script
|
||||
task prepNsis (type: Copy, dependsOn: ['prepYaCyProperties']) {
|
||||
from projectDir
|
||||
include 'build.nsi'
|
||||
include 'gpl.txt'
|
||||
into "${buildDir}/RELEASE/WINDOWS"
|
||||
|
||||
filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: project.ext.filterTokens)
|
||||
filter(ReplaceTokens, tokens: [REPL_VERSION: project.version])
|
||||
|
||||
copy {
|
||||
from projectDir
|
||||
include 'gpl.txt'
|
||||
into buildDir
|
||||
}
|
||||
}
|
||||
|
||||
// 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'
|
||||
}
|
||||
|
||||
// runs the support tool which creates gitbuildnumber.properties from info of local git repository
|
||||
task storeGitComInf(type: JavaExec) {
|
||||
outputs.file "gitbuildnumber.properties"
|
||||
mustRunAfter(build)
|
||||
if (file(".git").exists()) { // check if this is a git repos
|
||||
inputs.files ( fileTree(".git") {
|
||||
include "refs/**/*" // these two should work and change after commit
|
||||
include "index"
|
||||
} )
|
||||
}
|
||||
classpath = files('libbuild/GitComInf-1.0-all.jar')
|
||||
args = [project.projectDir.getPath(), project.projectDir.getPath() + "/gitbuildnumber.properties"]
|
||||
mainClass = 'GitComInf'
|
||||
}
|
||||
|
||||
//--- build aliases : define a synonym here if you want a shortcut to run multiple targets
|
||||
// workaround to run storeGitComInf after a build without adding arbitray dependencies
|
||||
// this makes sure gitbuildnumber.properties is availabel and up-to-date
|
||||
def buildAliases = [
|
||||
'build' : ['build','storeGitComInf']
|
||||
]
|
||||
def expandedTaskList = []
|
||||
gradle.startParameter.taskNames.each {
|
||||
expandedTaskList << (buildAliases[it] ? buildAliases[it] : it)
|
||||
}
|
||||
gradle.startParameter.taskNames = expandedTaskList.flatten()
|
||||
|
||||
// create a Mac distribution archive
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
task distMacApp (type: Copy, dependsOn: ['copyFilesToDistDir','copyDependenciesForDistribution'], group: 'distribution') {
|
||||
description 'Bundles the project as a Mac distribution - task must run on Mac'
|
||||
|
||||
from "${buildDir}/RELEASE/MAIN" // remember var substitution requires double quote
|
||||
into "${buildDir}/RELEASE/MAC/YaCy.app/Contents/MacOS"
|
||||
|
||||
doLast {
|
||||
if (Os.isFamily(Os.FAMILY_MAC)) {
|
||||
eachFile { file ->
|
||||
if(file.getName().endsWith(".sh")) {
|
||||
file.setMode(0755)
|
||||
}
|
||||
}
|
||||
copy {
|
||||
from 'addon/YaCy.app'
|
||||
into "${buildDir}/RELEASE/MAC/YaCy.app"
|
||||
}
|
||||
String Dst = project.ext.filterTokens.get('REPL_DATE')
|
||||
String rNr = project.ext.filterTokens.get('REPL_REVISION_NR')
|
||||
String branch = project.ext.filterTokens.get('branch')
|
||||
String theArchiveName = 'yacy' + branch + '_v' + project.version + '_' + Dst + '_' + rNr + '.dmg'
|
||||
logger.info("task 'distMacApp' execute: " + "'hdiutil create -srcfolder ${buildDir}/RELEASE/MAC/YaCy.app ${buildDir}/distributions/" + theArchiveName + "'")
|
||||
ant {
|
||||
exec (executable:'hdiutil') {
|
||||
arg (line: "create -srcfolder ${buildDir}/RELEASE/MAC/YaCy.app ${buildDir}/distributions/" + theArchiveName)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.error ("this task 'distMacApp' can only run on a Mac")
|
||||
delete "${buildDir}/RELEASE/MAC"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
org.gradle.parallel=true
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
@ -1,234 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
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" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
@ -1,89 +0,0 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@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
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@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="-Xmx64m" "-Xms64m"
|
||||
|
||||
@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 execute
|
||||
|
||||
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 execute
|
||||
|
||||
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
|
||||
|
||||
: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 %*
|
||||
|
||||
: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
|
@ -1,5 +0,0 @@
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
@ -1,47 +0,0 @@
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'application'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
mainClassName = "GitComInf"
|
||||
version = "1.0"
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '5.13.0.202109080827-r'
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.33' // to prevent warning msg about missing binding
|
||||
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.33'
|
||||
}
|
||||
/*
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
"Main-Class": mainClassName ,
|
||||
"Class-Path": configurations.runtimeClasspath.collect { it.name }.join(' ')
|
||||
)
|
||||
}
|
||||
}
|
||||
*/
|
||||
// copy fat-jar to deploy location ..
|
||||
task installJarToRoot (type: Copy, dependsOn: shadowJar) {
|
||||
description 'Install jar in libbuild directory'
|
||||
from shadowJar.archiveFile
|
||||
into project.projectDir.getParent()
|
||||
doLast {
|
||||
logger.lifecycle ("copied jar to ${projectDir.getParent()}/" + shadowJar.archiveFileName.get())
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
@ -1,234 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
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" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
@ -1,89 +0,0 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@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
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@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="-Xmx64m" "-Xms64m"
|
||||
|
||||
@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 execute
|
||||
|
||||
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 execute
|
||||
|
||||
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
|
||||
|
||||
: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 %*
|
||||
|
||||
: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
|
@ -1,13 +0,0 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* The settings file is used to specify which projects to include in your build.
|
||||
*
|
||||
* Detailed information about configuring a multi-project build in Gradle can be found
|
||||
* in the user manual at https://docs.gradle.org/7.3/userguide/multi_project_builds.html
|
||||
*/
|
||||
|
||||
rootProject.name = 'GitComInf'
|
||||
|
||||
|
||||
|
@ -1,72 +0,0 @@
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
/** Port of older support library to be build with Gradle
|
||||
previous Maven Info
|
||||
<groupId>net.yacy.extlib</groupId>
|
||||
<artifactId>J7Zip-modified</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.02</version>
|
||||
<description>J7Zip library for YaCy sevenzipParser (not available in external maven repository)</description>
|
||||
*/
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs = ['src']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
version = '1.0.2'
|
||||
group = 'net.yacy.extlib'
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifactId = 'J7Zip-modified'
|
||||
from components.java
|
||||
versionMapping {
|
||||
usage('java-api') {
|
||||
fromResolutionOf('runtimeClasspath')
|
||||
}
|
||||
usage('java-runtime') {
|
||||
fromResolutionResult()
|
||||
}
|
||||
}
|
||||
pom {
|
||||
name = 'J7Zip'
|
||||
description = 'J7Zip library for YaCy sevenzipParser (not available in external maven repository)'
|
||||
licenses {
|
||||
license {
|
||||
name = 'GNU Lesser General Public License 2.1'
|
||||
url = 'http://www.gnu.org/licenses/lgpl-2.1.txt'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = 'scm:git:https://github.com/yacy/yacy_search_server.git'
|
||||
url = 'https://github.com/yacy/yacy_search_server'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
// change URLs to point to your repos, e.g. http://my.org/repo
|
||||
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// copy jar to yacycore /lib directory (used as dependencies)
|
||||
task installJarToRoot (type: Copy, dependsOn: jar) {
|
||||
from jar.archiveFile
|
||||
into "${projectDir.getParent()}/../lib"
|
||||
doLast {
|
||||
logger.lifecycle ("copied jar to ${projectDir.getParent()}/../lib/" + jar.archiveFileName.get())
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
@ -1,234 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
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" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
@ -1,89 +0,0 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@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
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@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="-Xmx64m" "-Xms64m"
|
||||
|
||||
@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 execute
|
||||
|
||||
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 execute
|
||||
|
||||
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
|
||||
|
||||
: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 %*
|
||||
|
||||
: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
|
@ -1,11 +0,0 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* The settings file is used to specify which projects to include in your build.
|
||||
*
|
||||
* Detailed information about configuring a multi-project build in Gradle can be found
|
||||
* in the user manual at https://docs.gradle.org/7.3/userguide/multi_project_builds.html
|
||||
*/
|
||||
|
||||
rootProject.name = 'J7Zip-modified'
|
||||
|
@ -1,37 +0,0 @@
|
||||
|
||||
allprojects {
|
||||
|
||||
group = 'net.yacy.libbuild'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java'
|
||||
}
|
||||
|
||||
version = "1.0"
|
||||
description = "Builds subprojects for yacycore and installs jars -> task: installExtLibJars"
|
||||
|
||||
dependencies {
|
||||
project("GitComInf")
|
||||
project("J7Zip-modified")
|
||||
}
|
||||
|
||||
//--- build aliases : define a synonym here if you want a shortcut to run multiple targets
|
||||
// workaround to run storeGitComInf after a build without adding arbitray dependencies
|
||||
// this makes sure gitbuildnumber.properties is availabel and up-to-date
|
||||
def buildAliases = [
|
||||
'installExtLibJars' : ["J7Zip-modified:installJarToRoot","GitComInf:installJarToRoot"]
|
||||
]
|
||||
def expandedTaskList = []
|
||||
gradle.startParameter.taskNames.each {
|
||||
expandedTaskList << (buildAliases[it] ? buildAliases[it] : it)
|
||||
}
|
||||
gradle.startParameter.taskNames = expandedTaskList.flatten()
|
||||
|
||||
task installExtLibJars ( group: 'build') {
|
||||
// we use above startParameter to install GitComInf.jar, as the shadow (uber) jar is used (not avail in normal subproject properties)
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
# Generally it is better to set the version only for release builds, build time
|
||||
# from command line using -Pversion=1.0
|
||||
#
|
||||
# Only use SNAPSHOT versions if you need to contribute your binaries to a
|
||||
# local Maven project.
|
||||
version=1.0
|
||||
|
@ -1,234 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
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" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
@ -1,89 +0,0 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@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
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@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="-Xmx64m" "-Xms64m"
|
||||
|
||||
@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 execute
|
||||
|
||||
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 execute
|
||||
|
||||
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
|
||||
|
||||
: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 %*
|
||||
|
||||
: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
|
@ -1,5 +0,0 @@
|
||||
|
||||
rootProject.name = 'libbuild'
|
||||
|
||||
include 'GitComInf'
|
||||
include 'J7Zip-modified'
|
@ -1,2 +0,0 @@
|
||||
rootProject.name = 'yacycore'
|
||||
|
Loading…
Reference in new issue