diff --git a/.classpath b/.classpath deleted file mode 100644 index 90dbbaf354d..00000000000 --- a/.classpath +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.gitignore b/.gitignore index f3a1406c15e..d8f8266050d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,33 @@ -# Intellij -.idea/ -*.iml -*.iws -*.eml -out/ -/bin/ -build/build/ -build/buildtest/ -build/results/ -build/temp/ -build/zap-exts/ +# Gradle +#------- +.gradle +/build +/buildSrc/build +/addOns/**/build + +# IDEA +# ---- +.idea +.shelf +/*.iml +/*.ipr +/*.iws +/buildSrc/*.iml +/buildSrc/*.ipr +/buildSrc/*.iws +/buildSrc/out +/out + +# Eclipse +# ------- +*.classpath +*.project +*.settings +/bin +/buildSrc/bin +/addOns/**/bin + +# NetBeans +# -------- +.nb-gradle +.nb-gradle-properties \ No newline at end of file diff --git a/.project b/.project deleted file mode 100644 index 974f8e2d92d..00000000000 --- a/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - zap-extensions - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/.travis.yml b/.travis.yml index a29c25fb222..2e32606c5bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,15 @@ language: java -script: ant -buildfile build/build.xml test jdk: - oraclejdk8 - openjdk11 + +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ + +cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ + - $HOME/.m2/repository/webdriver/ diff --git a/README.md b/README.md index 7363c91ca2e..75ffb237654 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,21 @@ If you are using the latest version of ZAP then you can browse and download add- You can also import add-ons you have downloaded manually from https://github.com/zaproxy/zap-extensions/releases via the "File / Load Add-on File..." menu option. Please see the [wiki](https://github.com/zaproxy/zap-extensions/wiki) for more details. + +## Building + +The add-ons are built with [Gradle], each add-on has its own project which is located under the `addOns` project/directory. + +To build all add-ons, simply run: + + ./gradlew build + +in the main directory of the project, the add-ons will be placed in the directory `build/zapAddOn/bin/` of each project. + +To build an add-on individually run: + + ./gradlew :addOns::build + +replacing `` with the name of the add-on (e.g. `reveal`). + +[Gradle]: https://gradle.org/ diff --git a/addOns/addOns.gradle.kts b/addOns/addOns.gradle.kts new file mode 100644 index 00000000000..f0238b73b6b --- /dev/null +++ b/addOns/addOns.gradle.kts @@ -0,0 +1,101 @@ +import org.zaproxy.gradle.addon.AddOnPlugin +import org.zaproxy.gradle.addon.AddOnPluginExtension +import org.zaproxy.gradle.addon.manifest.ManifestExtension +import org.zaproxy.gradle.addon.manifest.tasks.ConvertChangelogToChanges +import org.zaproxy.gradle.addon.wiki.WikiGenExtension +import org.zaproxy.gradle.addon.zapversions.ZapVersionsExtension + +plugins { + id("org.zaproxy.add-on") version "0.1.0" apply false +} + +description = "Common configuration of the add-ons." + +val zapCoreHelpWikiDir = "$rootDir/../zap-core-help-wiki/" +val zapExtensionsWikiDir = "$rootDir/../zap-extensions-wiki/" + +val parentProjects = listOf( +) + +val mainAddOns = listOf( +) +val weeklyAddOns = mainAddOns + listOf( +) + +mapOf("main" to mainAddOns, "weekly" to weeklyAddOns).forEach { entry -> + tasks { + val name = entry.key + val nameCapitalized = name.capitalize() + register("copy${nameCapitalized}AddOns") { + group = "ZAP" + description = "Copies the $name release add-ons to zaproxy project." + subprojects(entry.value) { + dependsOn(it.tasks.named(AddOnPlugin.COPY_ADD_ON_TASK_NAME)) + } + } + + register("list${nameCapitalized}AddOns") { + group = "ZAP" + description = "Lists the $name release add-ons." + doLast { + subprojects(entry.value) { println(it.name) } + } + } + } +} + +subprojects { + if (parentProjects.contains(project.name)) { + return@subprojects + } + + apply(plugin = "java-library") + apply(plugin = "org.zaproxy.add-on") + + java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + val generateManifestChanges by tasks.registering(ConvertChangelogToChanges::class) { + changelog.set(file("CHANGELOG.md")) + manifestChanges.set(file("$buildDir/zapAddOn/manifest-changes.html")) + } + + zapAddOn { + manifest { + changesFile.set(generateManifestChanges.flatMap { it.manifestChanges }) + } + + wikiGen { + wikiFilesPrefix.set("HelpAddons${zapAddOn.addOnId.get().capitalize()}") + wikiDir.set(project.provider { project.layout.projectDirectory.dir(if (mainAddOns.contains(zapAddOn.addOnId.get())) zapCoreHelpWikiDir else zapExtensionsWikiDir) }) + } + + zapVersions { + downloadUrl.set("https://github.com/zaproxy/zap-extensions/releases/download/2.7") + } + } +} + +fun subprojects(addOns: List, action: (Project) -> Unit) { + subprojects.filter { !parentProjects.contains(it.name) && addOns.contains(it.zapAddOn.addOnId.get()) }.forEach(action) +} + +fun Project.java(configure: JavaPluginExtension.() -> Unit): Unit = + (this as ExtensionAware).extensions.configure("java", configure) + +fun Project.zapAddOn(configure: AddOnPluginExtension.() -> Unit): Unit = + (this as ExtensionAware).extensions.configure("zapAddOn", configure) + +val Project.zapAddOn: AddOnPluginExtension get() = + (this as ExtensionAware).extensions.getByName("zapAddOn") as AddOnPluginExtension + +fun AddOnPluginExtension.manifest(configure: ManifestExtension.() -> Unit): Unit = + (this as ExtensionAware).extensions.configure("manifest", configure) + +fun AddOnPluginExtension.wikiGen(configure: WikiGenExtension.() -> Unit): Unit = + (this as ExtensionAware).extensions.configure("wikiGen", configure) + +fun AddOnPluginExtension.zapVersions(configure: ZapVersionsExtension.() -> Unit): Unit = + (this as ExtensionAware).extensions.configure("zapVersions", configure) diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000000..3a3b314bc00 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,22 @@ +plugins { + id("com.diffplug.gradle.spotless") version "3.20.0" +} + +allprojects { + apply(plugin = "com.diffplug.gradle.spotless") + + repositories { + mavenCentral() + } + + spotless { + kotlinGradle { + ktlint() + } + } + + tasks.withType().configureEach { + options.encoding = "utf-8" + options.compilerArgs = listOf("-Xlint:all", "-Xlint:-path", "-Xlint:-options", "-Werror") + } +} \ No newline at end of file diff --git a/build/.gitignore b/build/.gitignore deleted file mode 100644 index c4073d2a167..00000000000 --- a/build/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/build/ -/zap-exts/ diff --git a/build/build.xml b/build/build.xml deleted file mode 100644 index 07114c08f33..00000000000 --- a/build/build.xml +++ /dev/null @@ -1,617 +0,0 @@ - - Build ZAP extensions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/lib/java-help-0.0.1-SNAPSHOT.jar b/build/lib/java-help-0.0.1-SNAPSHOT.jar deleted file mode 100644 index cd666a8f376..00000000000 Binary files a/build/lib/java-help-0.0.1-SNAPSHOT.jar and /dev/null differ diff --git a/build/lib/jhall.jar b/build/lib/jhall.jar deleted file mode 100644 index d0ad2e9c69c..00000000000 Binary files a/build/lib/jhall.jar and /dev/null differ diff --git a/build/lib/remark-1.0.0-SNAPSHOT.jar b/build/lib/remark-1.0.0-SNAPSHOT.jar deleted file mode 100644 index feb9cae80ac..00000000000 Binary files a/build/lib/remark-1.0.0-SNAPSHOT.jar and /dev/null differ diff --git a/build/lib/wiki-ant-0.0.1-SNAPSHOT.jar b/build/lib/wiki-ant-0.0.1-SNAPSHOT.jar deleted file mode 100644 index 6092c37b416..00000000000 Binary files a/build/lib/wiki-ant-0.0.1-SNAPSHOT.jar and /dev/null differ diff --git a/build/lib/zap-versions-0.0.1-SNAPSHOT.jar b/build/lib/zap-versions-0.0.1-SNAPSHOT.jar deleted file mode 100644 index 1d40f267072..00000000000 Binary files a/build/lib/zap-versions-0.0.1-SNAPSHOT.jar and /dev/null differ diff --git a/src/org/zaproxy/zap/extension/ZapAddOn.xml b/docs/ZapAddOn.xml similarity index 100% rename from src/org/zaproxy/zap/extension/ZapAddOn.xml rename to docs/ZapAddOn.xml diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000000..e68633cff62 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +org.gradle.caching=true +org.gradle.parallel=true \ No newline at end of file diff --git a/gradle/spotless/license.java b/gradle/spotless/license.java new file mode 100644 index 00000000000..6c2dca3c49b --- /dev/null +++ b/gradle/spotless/license.java @@ -0,0 +1,19 @@ +/* + * Zed Attack Proxy (ZAP) and its related class files. + * + * ZAP is an HTTP/HTTPS proxy for assessing web application security. + * + * Copyright $YEAR The ZAP Development Team + * + * 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 + * + * http://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. + */ \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000000..87b738cbd05 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..1b2b07cfb00 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 00000000000..af6708ff229 --- /dev/null +++ b/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +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='"-Xmx64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# 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 + ;; + 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" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000000..0f8d5937c4a --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,84 @@ +@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 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" + +@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 init + +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 init + +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 + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +: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 %CMD_LINE_ARGS% + +: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 diff --git a/lib/commons-codec-1.9.jar b/lib/commons-codec-1.9.jar deleted file mode 100644 index ef35f1c50d7..00000000000 Binary files a/lib/commons-codec-1.9.jar and /dev/null differ diff --git a/lib/commons-collections-3.2.2.jar b/lib/commons-collections-3.2.2.jar deleted file mode 100644 index fa5df82a630..00000000000 Binary files a/lib/commons-collections-3.2.2.jar and /dev/null differ diff --git a/lib/commons-configuration-1.9.jar b/lib/commons-configuration-1.9.jar deleted file mode 100644 index fa8fac1905f..00000000000 Binary files a/lib/commons-configuration-1.9.jar and /dev/null differ diff --git a/lib/commons-httpclient-3.1.jar b/lib/commons-httpclient-3.1.jar deleted file mode 100644 index 7c59774aed4..00000000000 Binary files a/lib/commons-httpclient-3.1.jar and /dev/null differ diff --git a/lib/commons-lang-2.6.jar b/lib/commons-lang-2.6.jar deleted file mode 100644 index 98467d3a653..00000000000 Binary files a/lib/commons-lang-2.6.jar and /dev/null differ diff --git a/lib/crawljax-core-3.7.jar b/lib/crawljax-core-3.7.jar deleted file mode 100644 index 574b6e56dfd..00000000000 Binary files a/lib/crawljax-core-3.7.jar and /dev/null differ diff --git a/lib/diffutils-1.2.1.jar b/lib/diffutils-1.2.1.jar deleted file mode 100644 index 3c325a83f08..00000000000 Binary files a/lib/diffutils-1.2.1.jar and /dev/null differ diff --git a/lib/fuzz-beta-4.zap b/lib/fuzz-beta-4.jar similarity index 100% rename from lib/fuzz-beta-4.zap rename to lib/fuzz-beta-4.jar diff --git a/lib/groovy-all-2.4.14.jar b/lib/groovy-all-2.4.14.jar deleted file mode 100644 index 7039fb98ca6..00000000000 Binary files a/lib/groovy-all-2.4.14.jar and /dev/null differ diff --git a/lib/guice-3.0.jar b/lib/guice-3.0.jar deleted file mode 100644 index f313e2b089d..00000000000 Binary files a/lib/guice-3.0.jar and /dev/null differ diff --git a/lib/hsqldb-2.3.3.jar b/lib/hsqldb-2.3.3.jar deleted file mode 100644 index 2f05edf1071..00000000000 Binary files a/lib/hsqldb-2.3.3.jar and /dev/null differ diff --git a/lib/javax.inject-1.jar b/lib/javax.inject-1.jar deleted file mode 100644 index b2a9d0bf7bd..00000000000 Binary files a/lib/javax.inject-1.jar and /dev/null differ diff --git a/lib/jdom.jar b/lib/jdom.jar deleted file mode 100644 index 65a1b3f7373..00000000000 Binary files a/lib/jdom.jar and /dev/null differ diff --git a/lib/jericho-html-3.1.jar b/lib/jericho-html-3.1.jar deleted file mode 100644 index 97c06ee12a3..00000000000 Binary files a/lib/jericho-html-3.1.jar and /dev/null differ diff --git a/lib/json-lib-2.4-jdk15.jar b/lib/json-lib-2.4-jdk15.jar deleted file mode 100644 index 68d4f3b09c7..00000000000 Binary files a/lib/json-lib-2.4-jdk15.jar and /dev/null differ diff --git a/lib/log4j-1.2.16.jar b/lib/log4j-1.2.16.jar deleted file mode 100644 index 3f9d847618b..00000000000 Binary files a/lib/log4j-1.2.16.jar and /dev/null differ diff --git a/lib/odfdom-java-0.8.8-incubating.jar b/lib/odfdom-java-0.8.8-incubating.jar deleted file mode 100644 index fc6e2287d68..00000000000 Binary files a/lib/odfdom-java-0.8.8-incubating.jar and /dev/null differ diff --git a/lib/rsyntaxtextarea-2.5.8.jar b/lib/rsyntaxtextarea-2.5.8.jar deleted file mode 100644 index 9f250edf0f8..00000000000 Binary files a/lib/rsyntaxtextarea-2.5.8.jar and /dev/null differ diff --git a/lib/selenium-server-standalone-3.7.1.jar b/lib/selenium-server-standalone-3.7.1.jar deleted file mode 100644 index fd1f03e26d4..00000000000 Binary files a/lib/selenium-server-standalone-3.7.1.jar and /dev/null differ diff --git a/lib/simple-odf-0.7-incubating.jar b/lib/simple-odf-0.7-incubating.jar deleted file mode 100644 index 8ba6895ab14..00000000000 Binary files a/lib/simple-odf-0.7-incubating.jar and /dev/null differ diff --git a/lib/swingx-all-1.6.4.jar b/lib/swingx-all-1.6.4.jar deleted file mode 100644 index 3078bb6364c..00000000000 Binary files a/lib/swingx-all-1.6.4.jar and /dev/null differ diff --git a/lib/xercesImpl.jar b/lib/xercesImpl.jar deleted file mode 100644 index 8f762e1a85f..00000000000 Binary files a/lib/xercesImpl.jar and /dev/null differ diff --git a/lib/xml-apis.jar b/lib/xml-apis.jar deleted file mode 100644 index 46733464fc7..00000000000 Binary files a/lib/xml-apis.jar and /dev/null differ diff --git a/lib/xslt-runner-1.2.1-incubating.jar b/lib/xslt-runner-1.2.1-incubating.jar deleted file mode 100644 index bc838d406ed..00000000000 Binary files a/lib/xslt-runner-1.2.1-incubating.jar and /dev/null differ diff --git a/lib/xslt-runner-task-1.2.1-incubating.jar b/lib/xslt-runner-task-1.2.1-incubating.jar deleted file mode 100644 index 8fea559fe05..00000000000 Binary files a/lib/xslt-runner-task-1.2.1-incubating.jar and /dev/null differ diff --git a/lib/zap-2.7.0.jar b/lib/zap-2.7.0.jar deleted file mode 100644 index b840e69809b..00000000000 Binary files a/lib/zap-2.7.0.jar and /dev/null differ diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000000..87437d5e641 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,25 @@ +rootProject.name = "zap-extensions" + +val addOnsProjectName = "addOns" +include(addOnsProjectName) + +// Keep the add-ons in alphabetic order. +var addOns = listOf( +) + +addOns.forEach { include("$addOnsProjectName:$it") } + +rootProject.children.forEach { project -> setUpProject(settingsDir, project) } + +fun setUpProject(parentDir: File, project: ProjectDescriptor) { + project.projectDir = File(parentDir, project.name) + project.buildFileName = "${project.name}.gradle.kts" + + if (!project.projectDir.isDirectory) { + throw AssertionError("Project ${project.name} has no directory: ${project.projectDir}") + } + if (!project.buildFile.isFile) { + throw AssertionError("Project ${project.name} has no build file: ${project.buildFile}") + } + project.children.forEach { project -> setUpProject(project.parent!!.projectDir, project) } +}