diff --git a/LICENSE.txt b/LICENSE.txt index 99fe36caed..62c9612afb 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -362,7 +362,7 @@ distributions. See the source package for the additional license information. Admin Manager: Public domain - Gradle wrapper 5.2.1: + Gradle wrapper 8.5: (not included in most distribution packages) - Copyright (c) 2017 the original author or authors. + Copyright (c) 2023 the original author or authors. See licenses/LICENSE-Apache2.0.txt diff --git a/apps/desktopgui/build.gradle b/apps/desktopgui/build.gradle index 05bce20e49..655e968e2b 100644 --- a/apps/desktopgui/build.gradle +++ b/apps/desktopgui/build.gradle @@ -1,3 +1,7 @@ +plugins { + id 'java-library' +} + sourceSets { main { java { @@ -8,10 +12,10 @@ sourceSets { } dependencies { - compile project(':core') - compile project(':router') - compile project(':installer') - compile project(':apps:systray') + api project(':core') + api project(':router') + api project(':installer') + api project(':apps:systray') } // Create the java files from the po files. The jar task will compile them. diff --git a/apps/i2pcontrol/build.gradle b/apps/i2pcontrol/build.gradle index 79da216234..71545f8512 100644 --- a/apps/i2pcontrol/build.gradle +++ b/apps/i2pcontrol/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'java-library' id 'war' } @@ -11,13 +12,15 @@ sourceSets { } dependencies { - providedCompile project(':router') - providedCompile project(':apps:jetty') - providedCompile files('../../installer/lib/wrapper/all/wrapper.jar') + api project(':router') + api project(':apps:jetty') + api files('../../installer/lib/wrapper/all/wrapper.jar') + api fileTree("../jetty/apache-tomcat-${tomcatVersion}") + api fileTree("../jetty/jetty-distribution-${jettyVersion}") } war { - archiveName 'jsonrpc.war' + archiveBaseName.set('jsonrpc') webXml = file('web.xml') } diff --git a/apps/i2psnark/build.gradle b/apps/i2psnark/build.gradle index 64ade4c454..ff074d68a4 100644 --- a/apps/i2psnark/build.gradle +++ b/apps/i2psnark/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'java-library' id 'war' } @@ -12,14 +13,14 @@ sourceSets { } dependencies { - compile project(':core') - providedCompile project(':apps:systray') - compile 'gnu.getopt:java-getopt:1.0.13' - providedCompile project(':apps:ministreaming') - providedCompile project(':apps:jetty') + api project(':core') + api project(':apps:systray') + api 'gnu.getopt:java-getopt:1.0.13' + api project(':apps:ministreaming') + api project(':apps:jetty') // this is not needed except for standalone, // but we build the standalone classes even for non-standalone - providedCompile project(':apps:desktopgui') + api project(':apps:desktopgui') } task i2psnarkJar(type: Jar) { diff --git a/apps/i2ptunnel/build.gradle b/apps/i2ptunnel/build.gradle index bd1ea1510d..7eed72c059 100644 --- a/apps/i2ptunnel/build.gradle +++ b/apps/i2ptunnel/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'java-library' id 'war' } @@ -18,13 +19,14 @@ sourceSets { } dependencies { - compile project(':core') - providedCompile project(':apps:ministreaming') - compile 'gnu.getopt:java-getopt:1.0.13' - providedCompile project(':apps:jetty') - - implementation 'org.apache.ant:ant:1.10.10' - implementation fileTree("../jetty/apache-tomacat-${tomcatVersion}") + api project(':core') + api project(':apps:ministreaming') + api 'gnu.getopt:java-getopt:1.0.13' + api project(':apps:jetty') + + // seems like it should be compileOnly but that doesn't work + implementation 'org.apache.ant:ant:1.10.14' + api fileTree("../jetty/apache-tomcat-${tomcatVersion}") } // Create the java files from the po files. The jar task will compile them. @@ -159,12 +161,12 @@ task tempBeansJar(type: Jar) { include '**/EditBean.class' include '**/ui/*.class' include '**/IndexBean.class' - baseName = 'temp-beans' + archiveBaseName = 'temp-beans' } // only for android task uiJar(type: Jar) { - baseName = 'i2ptunnel-ui' + archiveBaseName = 'i2ptunnel-ui' from sourceSets.main.output include '**/ui/*.class' manifest { @@ -177,6 +179,7 @@ artifacts { } war { + duplicatesStrategy 'exclude' include '**/EditBean.class' include '**/ui/*.class' include '**/IndexBean.class' diff --git a/apps/imagegen/build.gradle b/apps/imagegen/build.gradle index a55972a73f..776a8efe36 100644 --- a/apps/imagegen/build.gradle +++ b/apps/imagegen/build.gradle @@ -14,8 +14,9 @@ sourceSets { } dependencies { - providedCompile project(':core') - providedCompile project(':apps:jetty') + implementation project(':core') + implementation project(':apps:jetty') + implementation fileTree("../jetty/apache-tomcat-${tomcatVersion}") } war { diff --git a/apps/jetty/build.gradle b/apps/jetty/build.gradle index 1c17c5efd1..fdc70dbd81 100644 --- a/apps/jetty/build.gradle +++ b/apps/jetty/build.gradle @@ -1,3 +1,7 @@ +plugins { + id 'java-library' +} + archivesBaseName = 'jetty-i2p' sourceSets { @@ -9,30 +13,30 @@ sourceSets { } dependencies { - ext.jettyVersion = '9.3.29.v20201019' + ext.jettyVersion = '9.3.30.v20211001' ext.tomcatVersion = "${tomcatVersion}" - compile project(':core') - compile 'org.eclipse.jetty:jetty-http:' + ext.jettyVersion - compile 'org.eclipse.jetty:jetty-io:' + ext.jettyVersion - compile 'org.eclipse.jetty:jetty-security:' + ext.jettyVersion - compile 'org.eclipse.jetty:jetty-server:' + ext.jettyVersion - compile 'org.eclipse.jetty:jetty-servlet:' + ext.jettyVersion - compile 'org.eclipse.jetty:jetty-util:' + ext.jettyVersion - compile 'org.eclipse.jetty:jetty-xml:' + ext.jettyVersion - runtime 'org.eclipse.jetty:apache-jsp:' + ext.jettyVersion - runtime 'org.eclipse.jetty:jetty-continuation:' + ext.jettyVersion - compile 'org.eclipse.jetty:jetty-deploy:' + ext.jettyVersion - runtime 'org.eclipse.jetty:jetty-jmx:' + ext.jettyVersion - runtime 'org.eclipse.jetty:jetty-rewrite:' + ext.jettyVersion - runtime 'org.eclipse.jetty:jetty-servlets:' + ext.jettyVersion - runtime 'org.eclipse.jetty:jetty-start:' + ext.jettyVersion - compile 'org.eclipse.jetty:jetty-webapp:' + ext.jettyVersion - compile 'org.apache.tomcat:tomcat-api:' + ext.tomcatVersion - runtime 'org.apache.tomcat:tomcat-el-api:' + ext.tomcatVersion - runtime 'org.apache.tomcat:tomcat-jasper:' + ext.tomcatVersion - runtime 'org.apache.tomcat:tomcat-jasper-el:' + ext.tomcatVersion - runtime 'org.apache.tomcat:tomcat-jsp-api:' + ext.tomcatVersion - runtime 'org.apache.tomcat:tomcat-juli:' + ext.tomcatVersion - runtime 'org.apache.tomcat:tomcat-util:' + ext.tomcatVersion - runtime 'org.apache.tomcat:tomcat-util-scan:' + ext.tomcatVersion + api project(':core') + api 'org.eclipse.jetty:jetty-http:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-io:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-security:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-server:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-servlet:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-util:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-xml:' + ext.jettyVersion + api 'org.eclipse.jetty:apache-jsp:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-continuation:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-deploy:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-jmx:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-rewrite:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-servlets:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-start:' + ext.jettyVersion + api 'org.eclipse.jetty:jetty-webapp:' + ext.jettyVersion + api 'org.apache.tomcat:tomcat-api:' + ext.tomcatVersion + api 'org.apache.tomcat:tomcat-el-api:' + ext.tomcatVersion + api 'org.apache.tomcat:tomcat-jasper:' + ext.tomcatVersion + api 'org.apache.tomcat:tomcat-jasper-el:' + ext.tomcatVersion + api 'org.apache.tomcat:tomcat-jsp-api:' + ext.tomcatVersion + api 'org.apache.tomcat:tomcat-juli:' + ext.tomcatVersion + api 'org.apache.tomcat:tomcat-util:' + ext.tomcatVersion + api 'org.apache.tomcat:tomcat-util-scan:' + ext.tomcatVersion } diff --git a/apps/jrobin/build.gradle b/apps/jrobin/build.gradle index 5efcf77b90..bb6c5defd6 100644 --- a/apps/jrobin/build.gradle +++ b/apps/jrobin/build.gradle @@ -1,3 +1,7 @@ +plugins { + id 'java-library' +} + sourceSets { main { java { @@ -7,5 +11,5 @@ sourceSets { } dependencies { - compile project(':core') + api project(':core') } diff --git a/apps/ministreaming/build.gradle b/apps/ministreaming/build.gradle index 2fd79c7d11..bee228bf47 100644 --- a/apps/ministreaming/build.gradle +++ b/apps/ministreaming/build.gradle @@ -44,7 +44,7 @@ configurations { tests } task testJar(type: Jar) { - baseName = 'mstreaming-test' + archiveBaseName = 'mstreaming-test' dependsOn classes from sourceSets.test.output } diff --git a/apps/routerconsole/build.gradle b/apps/routerconsole/build.gradle index 02ec2fe1d9..f749d4f4a0 100644 --- a/apps/routerconsole/build.gradle +++ b/apps/routerconsole/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'java-library' id 'war' id 'scala' } @@ -15,21 +16,24 @@ sourceSets { } dependencies { - compile project(':core') - compile project(':router') - compile project(':installer') - compile 'gnu.getopt:java-getopt:1.0.13' - - // below were providedCompile - providedCompile project(':apps:desktopgui') - providedCompile project(':apps:systray') - providedCompile project(':apps:jetty') - providedCompile project(':apps:jrobin') - - implementation 'org.apache.ant:ant:1.10.10' - implementation fileTree("../jetty/apache-tomacat-${tomcatVersion}") - testCompile "org.scala-lang:scala-library:2.12.4" - testCompile 'org.scalatest:scalatest_2.12:3.0.4' + api project(':core') + api project(':router') + api project(':installer') + api 'gnu.getopt:java-getopt:1.0.13' + + api project(':apps:desktopgui') + api project(':apps:systray') + api project(':apps:jetty') + api project(':apps:jrobin') + api files('../../installer/lib/wrapper/all/wrapper.jar') + api fileTree("../jetty/jetty-distribution-${jettyVersion}") + + // seems like it should be compileOnly but that doesn't work + implementation 'org.apache.ant:ant:1.10.14' + api fileTree("../jetty/apache-tomcat-${tomcatVersion}") + // don't use 2.12.4, stack overflow: https://github.com/sbt/zinc/issues/1010 + testImplementation "org.scala-lang:scala-library:2.12.5" + testImplementation 'org.scalatest:scalatest_2.12:3.0.4' } if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVersion.VERSION_1_7) { @@ -173,6 +177,7 @@ war.dependsOn(bundle,precompileJsp) war { + duplicatesStrategy 'exclude' rootSpec.exclude('**/*.jar') rootSpec.exclude('/com/vuze/**/*') rootSpec.exclude('/edu/internet2/**/*') diff --git a/apps/sam/build.gradle b/apps/sam/build.gradle index 312580ff24..f8266ae243 100644 --- a/apps/sam/build.gradle +++ b/apps/sam/build.gradle @@ -1,3 +1,7 @@ +plugins { + id 'java-library' +} + sourceSets { main { java { @@ -12,7 +16,7 @@ sourceSets { } dependencies { - compile project(':core') - compile project(':apps:ministreaming') - compile 'gnu.getopt:java-getopt:1.0.13' + api project(':core') + api project(':apps:ministreaming') + api 'gnu.getopt:java-getopt:1.0.13' } diff --git a/apps/susidns/build.gradle b/apps/susidns/build.gradle index 672f7805b3..e408ce60e0 100644 --- a/apps/susidns/build.gradle +++ b/apps/susidns/build.gradle @@ -12,11 +12,13 @@ sourceSets { } dependencies { - providedCompile project(':core') - providedCompile project(':apps:jetty') + implementation project(':core') + implementation project(':apps:jetty') - implementation 'org.apache.ant:ant:1.10.10' - implementation fileTree("../jetty/apache-tomacat-${tomcatVersion}") + // seems like it should be compileOnly but that doesn't work + implementation 'org.apache.ant:ant:1.10.14' + implementation fileTree("../jetty/apache-tomcat-${tomcatVersion}") + implementation fileTree("../jetty/jetty-distribution-${jettyVersion}") } // Create the java files from the po files. The jar task will compile them. diff --git a/apps/susimail/build.gradle b/apps/susimail/build.gradle index 56c6ec64ae..31ed555f9b 100644 --- a/apps/susimail/build.gradle +++ b/apps/susimail/build.gradle @@ -12,8 +12,8 @@ sourceSets { } dependencies { - compile project(':core') - providedCompile project(':apps:jetty') + implementation project(':core') + implementation project(':apps:jetty') } // Create the java files from the po files. The jar task will compile them. @@ -36,6 +36,7 @@ war { webInf { into 'classes' from 'src/susimail.properties' + duplicatesStrategy 'include' } webXml = file('src/WEB-INF/web.xml') } diff --git a/apps/systray/build.gradle b/apps/systray/build.gradle index 5efcf77b90..bb6c5defd6 100644 --- a/apps/systray/build.gradle +++ b/apps/systray/build.gradle @@ -1,3 +1,7 @@ +plugins { + id 'java-library' +} + sourceSets { main { java { @@ -7,5 +11,5 @@ sourceSets { } dependencies { - compile project(':core') + api project(':core') } diff --git a/build.gradle b/build.gradle index 1adf0fd2f8..5c3ea27c7d 100644 --- a/build.gradle +++ b/build.gradle @@ -71,9 +71,10 @@ subprojects { } dependencies { - testCompile 'junit:junit:4.+' - testCompile 'org.hamcrest:hamcrest-library:1.3' - testCompile 'org.mockito:mockito-core:2.5.0' + // https://stackoverflow.com/questions/44493378/whats-the-difference-between-api-api-and-compile-in-gradle + testImplementation 'junit:junit:4.+' + testImplementation 'org.hamcrest:hamcrest-library:1.3' + testImplementation 'org.mockito:mockito-core:2.5.0' } @@ -118,14 +119,16 @@ task codeCoverageReport(type: JacocoReport) { classDirectories.from(files(subprojects.sourceSets.main.output)) executionData.from(files(subprojects.jacocoTestReport.executionData)) - doFirst { - executionData = files(executionData.findAll { it.exists() }) - } + // > The value for this file collection is final and cannot be changed. + //doFirst { + // executionData = files(executionData.findAll { it.exists() }) + //} reports { - xml.enabled true + // https://stackoverflow.com/questions/73546718/changing-enabled-to-required-throws-an-error-in-gradle + xml.required.set(true) xml.destination file("${buildDir}/reports/jacoco/report.xml") - html.enabled true + html.required.set(true) html.destination file("${buildDir}/reports/jacoco/html") } } diff --git a/core/build.gradle b/core/build.gradle index 75b828564e..c7b22e3636 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java-library' id 'scala' - id 'me.champeau.gradle.jmh' version '0.4.8' + id 'me.champeau.jmh' version '0.7.2' } archivesBaseName = 'i2p' @@ -41,15 +41,16 @@ sourceSets { } dependencies { - implementation 'gnu.getopt:java-getopt:1.0.13' - implementation 'org.gnu.gettext:libintl:0.18.3' + api 'gnu.getopt:java-getopt:1.0.13' + api 'org.gnu.gettext:libintl:0.18.3' if (project.hasProperty("with.jbigi")) { runtimeOnly project(path: ':installer', configuration: 'jbigi') } - testCompile "org.scala-lang:scala-library:2.12.4" - testCompile 'org.scalatest:scalatest_2.12:3.0.4' + // don't use 2.12.4, stack overflow: https://github.com/sbt/zinc/issues/1010 + testImplementation "org.scala-lang:scala-library:2.12.5" + testImplementation 'org.scalatest:scalatest_2.12:3.0.4' } if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVersion.VERSION_1_7) { @@ -65,6 +66,7 @@ if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVe args = ['-R', 'build/classes/scala/test', '-o'] classpath = sourceSets.test.runtimeClasspath } + test.dependsOn scalaTest } @@ -94,7 +96,7 @@ configurations { tests } task testJar(type: Jar) { - baseName = 'i2p-test' + archiveBaseName = 'i2p-test' dependsOn classes from sourceSets.test.output } diff --git a/gradle.properties b/gradle.properties index bebc0bd6d1..a0fb73e616 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,7 @@ # Override these in ~/.gradle/gradle.properties if necessary java7BootClasspath= -tomcatVersion=9.0.45 +tomcatVersion=9.0.62 +jettyVersion = '9.3.30.v20211001' org.gradle.caching = true org.gradle.parallel = true org.gradle.configureondemand = true diff --git a/gradle/update.gradle b/gradle/update.gradle index 500e29fb02..6b415a823d 100644 --- a/gradle/update.gradle +++ b/gradle/update.gradle @@ -86,23 +86,25 @@ task prepUpdate(type: Copy) { task updaterRouter(type: Zip) { description 'makes an i2pupdate.zip file containing core and router jars only' dependsOn prepUpdateRouter - archiveName 'i2pupdate.zip' - destinationDir file('.') + // https://stackoverflow.com/questions/54501697/gradle-war-plugin-how-to-change-name-of-an-archive + // https://discuss.gradle.org/t/destinationdir-is-deprecated-archivename-is-deprecated/31586 + archiveFileName.set('i2pupdate.zip') + destinationDirectory.set(file('.')) from 'pkg-temp' } task updaterSmall(type: Zip) { description 'makes an i2pupdate.zip file with a subset of the resources' dependsOn prepUpdateSmall - archiveName 'i2pupdate.zip' - destinationDir file('.') + archiveFileName.set('i2pupdate.zip') + destinationDirectory.set(file('.')) from 'pkg-temp' } task updater(type: Zip) { description 'makes an i2pupdate.zip file' dependsOn prepUpdate - archiveName 'i2pupdate.zip' - destinationDir file('.') + archiveFileName.set('i2pupdate.zip') + destinationDirectory.set(file('.')) from 'pkg-temp' } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 27768f1bba..87b738cbd0 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 663c4485eb..a595206642 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip diff --git a/gradlew b/gradlew index cccdd3d517..af6708ff22 100755 --- a/gradlew +++ b/gradlew @@ -28,7 +28,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$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="" +DEFAULT_JVM_OPTS='"-Xmx64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index e95643d6a2..0f8d5937c4 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @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= +set DEFAULT_JVM_OPTS="-Xmx64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/installer/build.gradle b/installer/build.gradle index 90037fab19..f339cf3c3a 100644 --- a/installer/build.gradle +++ b/installer/build.gradle @@ -19,12 +19,12 @@ sourceSets { } dependencies { - compile project(':core') - runtime files('lib/wrapper/all/wrapper.jar') + implementation project(':core') + runtimeOnly files('lib/wrapper/all/wrapper.jar') } jar { - baseName 'utility' + archiveBaseName.set('utility') from project(':core').sourceSets.main.output include 'net/i2p/installer/**' include 'net/i2p/util/FileUtil.class' @@ -34,7 +34,7 @@ jar { } task jbigiJar(type: Jar) { - baseName = 'jbigi' + archiveBaseName = 'jbigi' from sourceSets.jbigi.output } diff --git a/reproducible/build.gradle b/reproducible/build.gradle index 29c9d9faf4..f961b60fc9 100644 --- a/reproducible/build.gradle +++ b/reproducible/build.gradle @@ -1,3 +1,7 @@ +plugins { + id 'java-library' +} + apply plugin: 'application' application { @@ -6,28 +10,28 @@ application { } dependencies { - implementation project(':router') - implementation project(':apps:ministreaming') - implementation project(':apps:streaming') - implementation project(':apps:i2ptunnel') - implementation project(':apps:jetty') - implementation project(':apps:i2psnark') - implementation project(':apps:systray') - implementation project(':apps:BOB') - implementation project(':apps:sam') - implementation project(':apps:routerconsole') - implementation project(':apps:desktopgui') - implementation project(':apps:jrobin') - implementation project(':apps:addressbook') - implementation project(':apps:susidns') - implementation project(':apps:susimail') - implementation project(':apps:i2pcontrol') - implementation project(':apps:imagegen') - implementation project(':core') - implementation project(':router') - implementation project(path : ':installer', configuration: 'jbigi') - implementation files("../apps/susidns/src/lib/standard.jar") - implementation files("../apps/susidns/src/lib/jstl.jar") + api project(':router') + api project(':apps:ministreaming') + api project(':apps:streaming') + api project(':apps:i2ptunnel') + api project(':apps:jetty') + api project(':apps:i2psnark') + api project(':apps:systray') + api project(':apps:BOB') + api project(':apps:sam') + api project(':apps:routerconsole') + api project(':apps:desktopgui') + api project(':apps:jrobin') + api project(':apps:addressbook') + api project(':apps:susidns') + api project(':apps:susimail') + api project(':apps:i2pcontrol') + api project(':apps:imagegen') + api project(':core') + api project(':router') + api project(path : ':installer', configuration: 'jbigi') + api files("../apps/susidns/src/lib/standard.jar") + api files("../apps/susidns/src/lib/jstl.jar") } import java.nio.file.* @@ -55,7 +59,7 @@ task copyWars { filter({it.getName().endsWith('war')}).each { file -> println "copying war $file exists ${file.exists()}" File target = new File(webappDir, file.getName()) - Files.copy(file.toPath(), target.toPath()) + Files.copy(file.toPath(), target.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } } } @@ -71,7 +75,7 @@ task copyGeoip() { File target = new File(geoipDir, "GeoLite2-Country.mmdb") File source = new File("$rootDir/installer/resources/GeoLite2-Country.mmdb.gz") InputStream is = new GZIPInputStream(new FileInputStream(source)) - java.nio.file.Files.copy(is, target.toPath()) + java.nio.file.Files.copy(is, target.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING) } } diff --git a/router/build.gradle b/router/build.gradle index 822eceb829..da6488e441 100644 --- a/router/build.gradle +++ b/router/build.gradle @@ -25,7 +25,7 @@ sourceSets { dependencies { api project(':core') - implementation 'gnu.getopt:java-getopt:1.0.13' + api 'gnu.getopt:java-getopt:1.0.13' testImplementation project(path: ':core', configuration: 'tests') }