From 067ee80ba00947d825ecb20d4a5021c4d48f4836 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Fri, 11 Dec 2020 19:45:25 +0000 Subject: [PATCH 1/3] remove IntelliJ and Eclipse project descriptors --- .idea/ant.xml | 6 -- .idea/compiler.xml | 41 ---------- .idea/copyright/profiles_settings.xml | 3 - .../javax_servlet_jsp_2_2_0_v201112011158.xml | 9 --- .idea/libraries/jettylib.xml | 22 ----- .idea/libraries/jrobin_1_5_9_1.xml | 9 --- .idea/libraries/lib.xml | 10 --- .idea/libraries/start.xml | 9 --- .idea/libraries/systray4j.xml | 9 --- .idea/libraries/tomcat_coyote_util.xml | 9 --- .idea/libraries/tomcat_lib.xml | 12 --- .idea/libraries/wrapper.xml | 9 --- .idea/libraries/wrapper_win.xml | 9 --- .idea/misc.xml | 57 ------------- .idea/modules.xml | 80 ------------------- .idea/runConfigurations/updater.xml | 6 -- apps/i2ptunnel/java/.classpath | 10 --- apps/i2ptunnel/java/.project | 17 ---- apps/ministreaming/java/.classpath | 9 --- apps/ministreaming/java/.project | 17 ---- apps/sam/java/.classpath | 8 -- apps/sam/java/.project | 17 ---- apps/streaming/java/.classpath | 10 --- apps/streaming/java/.project | 17 ---- apps/susidns/src/.classpath | 9 --- apps/susidns/src/.project | 17 ---- apps/systray/java/.classpath | 8 -- apps/systray/java/.project | 17 ---- core/java/.classpath | 8 -- core/java/.project | 31 ------- installer/resources/.project | 11 --- router/java/.classpath | 9 --- router/java/.project | 31 ------- 33 files changed, 546 deletions(-) delete mode 100644 .idea/ant.xml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .idea/libraries/javax_servlet_jsp_2_2_0_v201112011158.xml delete mode 100644 .idea/libraries/jettylib.xml delete mode 100644 .idea/libraries/jrobin_1_5_9_1.xml delete mode 100644 .idea/libraries/lib.xml delete mode 100644 .idea/libraries/start.xml delete mode 100644 .idea/libraries/systray4j.xml delete mode 100644 .idea/libraries/tomcat_coyote_util.xml delete mode 100644 .idea/libraries/tomcat_lib.xml delete mode 100644 .idea/libraries/wrapper.xml delete mode 100644 .idea/libraries/wrapper_win.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/runConfigurations/updater.xml delete mode 100644 apps/i2ptunnel/java/.classpath delete mode 100644 apps/i2ptunnel/java/.project delete mode 100644 apps/ministreaming/java/.classpath delete mode 100644 apps/ministreaming/java/.project delete mode 100644 apps/sam/java/.classpath delete mode 100644 apps/sam/java/.project delete mode 100644 apps/streaming/java/.classpath delete mode 100644 apps/streaming/java/.project delete mode 100644 apps/susidns/src/.classpath delete mode 100644 apps/susidns/src/.project delete mode 100644 apps/systray/java/.classpath delete mode 100644 apps/systray/java/.project delete mode 100644 core/java/.classpath delete mode 100644 core/java/.project delete mode 100644 installer/resources/.project delete mode 100644 router/java/.classpath delete mode 100644 router/java/.project diff --git a/.idea/ant.xml b/.idea/ant.xml deleted file mode 100644 index a2a476982..000000000 --- a/.idea/ant.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 46d39593e..000000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf337..000000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/libraries/javax_servlet_jsp_2_2_0_v201112011158.xml b/.idea/libraries/javax_servlet_jsp_2_2_0_v201112011158.xml deleted file mode 100644 index a00e42d2e..000000000 --- a/.idea/libraries/javax_servlet_jsp_2_2_0_v201112011158.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/jettylib.xml b/.idea/libraries/jettylib.xml deleted file mode 100644 index c5a3e8e26..000000000 --- a/.idea/libraries/jettylib.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/jrobin_1_5_9_1.xml b/.idea/libraries/jrobin_1_5_9_1.xml deleted file mode 100644 index 79ad5a548..000000000 --- a/.idea/libraries/jrobin_1_5_9_1.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml deleted file mode 100644 index 4a303ca96..000000000 --- a/.idea/libraries/lib.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/start.xml b/.idea/libraries/start.xml deleted file mode 100644 index 1b49f94bf..000000000 --- a/.idea/libraries/start.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/systray4j.xml b/.idea/libraries/systray4j.xml deleted file mode 100644 index 34142c8e7..000000000 --- a/.idea/libraries/systray4j.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/tomcat_coyote_util.xml b/.idea/libraries/tomcat_coyote_util.xml deleted file mode 100644 index 15802deec..000000000 --- a/.idea/libraries/tomcat_coyote_util.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/tomcat_lib.xml b/.idea/libraries/tomcat_lib.xml deleted file mode 100644 index 8d6c73f22..000000000 --- a/.idea/libraries/tomcat_lib.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/wrapper.xml b/.idea/libraries/wrapper.xml deleted file mode 100644 index f09668377..000000000 --- a/.idea/libraries/wrapper.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/wrapper_win.xml b/.idea/libraries/wrapper_win.xml deleted file mode 100644 index bba8535d7..000000000 --- a/.idea/libraries/wrapper_win.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index c82c6b64b..000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 12768205c..000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/updater.xml b/.idea/runConfigurations/updater.xml deleted file mode 100644 index b01b3cf1e..000000000 --- a/.idea/runConfigurations/updater.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/apps/i2ptunnel/java/.classpath b/apps/i2ptunnel/java/.classpath deleted file mode 100644 index b7b032f8c..000000000 --- a/apps/i2ptunnel/java/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/apps/i2ptunnel/java/.project b/apps/i2ptunnel/java/.project deleted file mode 100644 index da6d2de55..000000000 --- a/apps/i2ptunnel/java/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - i2ptunnel - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/apps/ministreaming/java/.classpath b/apps/ministreaming/java/.classpath deleted file mode 100644 index 65948fbaf..000000000 --- a/apps/ministreaming/java/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/apps/ministreaming/java/.project b/apps/ministreaming/java/.project deleted file mode 100644 index ad6de9aeb..000000000 --- a/apps/ministreaming/java/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - ministreaming - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/apps/sam/java/.classpath b/apps/sam/java/.classpath deleted file mode 100644 index 0645379a5..000000000 --- a/apps/sam/java/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/apps/sam/java/.project b/apps/sam/java/.project deleted file mode 100644 index 01c85f217..000000000 --- a/apps/sam/java/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - sam - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/apps/streaming/java/.classpath b/apps/streaming/java/.classpath deleted file mode 100644 index 25b9bda84..000000000 --- a/apps/streaming/java/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/apps/streaming/java/.project b/apps/streaming/java/.project deleted file mode 100644 index ad5b41eb7..000000000 --- a/apps/streaming/java/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - streaming - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/apps/susidns/src/.classpath b/apps/susidns/src/.classpath deleted file mode 100644 index b80c2ccf3..000000000 --- a/apps/susidns/src/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/apps/susidns/src/.project b/apps/susidns/src/.project deleted file mode 100644 index bf20fe7bd..000000000 --- a/apps/susidns/src/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - susidns - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/apps/systray/java/.classpath b/apps/systray/java/.classpath deleted file mode 100644 index dc7ab940f..000000000 --- a/apps/systray/java/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/apps/systray/java/.project b/apps/systray/java/.project deleted file mode 100644 index 3ca19d44e..000000000 --- a/apps/systray/java/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - systray - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/core/java/.classpath b/core/java/.classpath deleted file mode 100644 index a2a2a595a..000000000 --- a/core/java/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/core/java/.project b/core/java/.project deleted file mode 100644 index 3d6ab5374..000000000 --- a/core/java/.project +++ /dev/null @@ -1,31 +0,0 @@ - - - i2p_sdk - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.ui.externaltools.ExternalToolBuilder - clean,full,incremental, - - - LaunchConfigHandle - <project>/.externalToolBuilders/core-makejar.launch - - - incclean - true - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/installer/resources/.project b/installer/resources/.project deleted file mode 100644 index 03f612dc1..000000000 --- a/installer/resources/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - resources - - - - - - - - diff --git a/router/java/.classpath b/router/java/.classpath deleted file mode 100644 index 829d49526..000000000 --- a/router/java/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/router/java/.project b/router/java/.project deleted file mode 100644 index 3ae80fccc..000000000 --- a/router/java/.project +++ /dev/null @@ -1,31 +0,0 @@ - - - i2p_router - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.ui.externaltools.ExternalToolBuilder - clean,full,incremental, - - - LaunchConfigHandle - <project>/.externalToolBuilders/router-makejar.launch - - - incclean - true - - - - - - org.eclipse.jdt.core.javanature - - From 183280871fd35f413f080be9f072f85902ea005f Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Fri, 11 Dec 2020 20:12:27 +0000 Subject: [PATCH 2/3] get gradle assemble to work --- apps/jetty/build.gradle | 4 +- build.gradle | 106 +++------------------------------------- settings.gradle | 18 +++---- 3 files changed, 19 insertions(+), 109 deletions(-) diff --git a/apps/jetty/build.gradle b/apps/jetty/build.gradle index 7c8d8cf9c..f830a6a67 100644 --- a/apps/jetty/build.gradle +++ b/apps/jetty/build.gradle @@ -9,8 +9,8 @@ sourceSets { } dependencies { - ext.jettyVersion = '9.2.25.v20180606' - ext.tomcatVersion = '8.5.40' + ext.jettyVersion = '9.3.29.v20201019' + ext.tomcatVersion = '9.0.40' compile project(':core') compile 'org.eclipse.jetty:jetty-http:' + ext.jettyVersion compile 'org.eclipse.jetty:jetty-io:' + ext.jettyVersion diff --git a/build.gradle b/build.gradle index 7ca530387..b48c187cf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,3 @@ -plugins { - id 'idea' -} - String getReleaseVersion() { def releaseVersion file("core/java/src/net/i2p/CoreVersion.java").readLines().findAll({ line -> @@ -45,24 +41,6 @@ String getBuiltBy() { builtBy } -boolean haveMonotone() { - file("_MTN").exists() -} - -String getWorkspaceVersion() { - if (haveMonotone()) { - def stdout = new ByteArrayOutputStream() - exec { - executable 'mtn' - args 'automate', 'get_base_revision_id' - standardOutput = stdout - } - stdout.toString().trim() - } else { - 'unknown' - } -} - String compat(String src) { if (src.contains('.')) { src.substring(src.lastIndexOf('.') + 1) @@ -71,13 +49,8 @@ String compat(String src) { } } -String javaExecutable(String targetJavaHome, String execName) { - def javaExecutablesPath = new File(targetJavaHome, "bin") - def executable = new File(javaExecutablesPath, execName) - if (!executable.exists()) { - throw new IllegalArgumentException("There is no ${execName} executable in ${javaExecutablesPath}") - } - executable.toString() +String getWorkspaceVersion() { + "git" // TODO: extract revision } def releaseVersion = getReleaseVersion() @@ -88,14 +61,9 @@ def fullVersion = "$releaseVersion-$buildVersion$buildExtra" def builtBy = getBuiltBy() def workspaceVersion = getWorkspaceVersion() -// Exclude apps/ dir itself, but include its subdirs -def javaProjects = subprojects - project(':apps') - -configure(javaProjects) { +subprojects { apply plugin: 'java' apply plugin: 'jacoco' - apply plugin: 'eclipse' - apply plugin: 'idea' repositories { jcenter() @@ -133,74 +101,16 @@ configure(javaProjects) { preserveFileTimestamps = false reproducibleFileOrder = true } - - def i2pBootClasspath - // Set java7BootClasspath=/path/to/rt.jar:/path/to/jce.jar in ~/.gradle/gradle.properties if needed - if (java7BootClasspath) { - i2pBootClasspath = java7BootClasspath - } else { - def java7Home = System.getenv("JAVA7_HOME") - if (java7Home) { - i2pBootClasspath = "${java7Home}/jre/lib/jce.jar:${java7Home}/jre/lib/rt.jar" - } - } - - if (i2pBootClasspath) { - tasks.withType(AbstractCompile, { AbstractCompile ac -> - ac.options.bootstrapClasspath = files(i2pBootClasspath) - }) - } else { - if (JavaVersion.current().java8Compatible && !JavaVersion.current().java9Compatible) { - throw new GradleException("Set java7BootClasspath property or JAVA7_HOME environment variable to enable cross-compilation, or run Gradle with JDK 9+") - } - project.afterEvaluate { - tasks.withType(JavaCompile) { - def version = compat(sourceCompatibility) - logger.info("Configuring $name to use --release $version") - options.compilerArgs.addAll(['--release', version]) - } - } - } - - // Set up Java override if configured (used to test with Java 7). - def targetJavaHome = System.getenv("TARGET_JAVA_HOME") - if (targetJavaHome) { - if (JavaVersion.current().java9Compatible) { - throw new GradleException("Only set TARGET_JAVA_HOME with JDK 8") - } - - project.afterEvaluate { - logger.info("Target Java home set to ${targetJavaHome}") - logger.info("Configuring Gradle to use forked compilation and testing") - - tasks.withType(JavaCompile) { - options.fork = true - options.forkOptions.javaHome = file(targetJavaHome) - } - - tasks.withType(Javadoc) { - executable = javaExecutable(targetJavaHome, "javadoc") - } - - tasks.withType(Test) { - executable = javaExecutable(targetJavaHome, "java") - } - - tasks.withType(JavaExec) { - executable = javaExecutable(targetJavaHome, "java") - } - } - } } task codeCoverageReport(type: JacocoReport) { - dependsOn(javaProjects.test) + dependsOn(subprojects.test) jacocoClasspath = project(':core').configurations.jacocoAnt - additionalSourceDirs.from(files(javaProjects.sourceSets.main.allSource.srcDirs)) - sourceDirectories.from(files(javaProjects.sourceSets.main.allSource.srcDirs)) - classDirectories.from(files(javaProjects.sourceSets.main.output)) - executionData.from(files(javaProjects.jacocoTestReport.executionData)) + additionalSourceDirs.from(files(subprojects.sourceSets.main.allSource.srcDirs)) + sourceDirectories.from(files(subprojects.sourceSets.main.allSource.srcDirs)) + classDirectories.from(files(subprojects.sourceSets.main.output)) + executionData.from(files(subprojects.jacocoTestReport.executionData)) doFirst { executionData = files(executionData.findAll { it.exists() }) diff --git a/settings.gradle b/settings.gradle index 580063a4c..0ca293b93 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,17 +1,17 @@ -include 'apps:addressbook' -include 'apps:BOB' -include 'apps:desktopgui' -include 'apps:i2psnark' +include 'apps:ministreaming' +include 'apps:streaming' include 'apps:i2ptunnel' include 'apps:jetty' -include 'apps:jrobin' -include 'apps:ministreaming' -include 'apps:routerconsole' +include 'apps:i2psnark' +include 'apps:systray' +include 'apps:BOB' include 'apps:sam' -include 'apps:streaming' +include 'apps:routerconsole' +include 'apps:desktopgui' +include 'apps:jrobin' +include 'apps:addressbook' include 'apps:susidns' include 'apps:susimail' -include 'apps:systray' include 'core' include 'installer' include 'router' From 2d154cc90ed6540c383472c3ac7aef1697dfd014 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Fri, 11 Dec 2020 20:21:10 +0000 Subject: [PATCH 3/3] update gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 0a83f028e..b5440a981 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,10 @@ sloccount.sc .settings/ # IDEA *.iml +.idea +# Gradle +.gradle + +# TODO: why does this file appear? +apps/routerconsole/jsp/favicon.ico