Skip to content

Commit 2be0a69

Browse files
authored
Merge pull request #85 from thc202/gradle/update-8.13
Update Gradle and release 0.13.0
2 parents 73a5ca7 + 2e41ada commit 2be0a69

File tree

11 files changed

+40
-17
lines changed

11 files changed

+40
-17
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [0.13.0] - 2025-02-27
8+
### Changed
9+
- Recommended minimum Gradle version is now 8.13.
10+
- Update ZAP API client to version 1.16.0.
811

912
## [0.12.0] - 2024-12-04
1013
### Changed
@@ -241,7 +244,7 @@ Provided by the plugin:
241244
with a `ZapVersions.xml` from an add-on.
242245

243246

244-
[Unreleased]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.12.0...HEAD
247+
[0.13.0]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.12.0...v0.13.0
245248
[0.12.0]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.11.0...v0.12.0
246249
[0.11.0]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.10.0...v0.11.0
247250
[0.10.0]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.9.0...v0.10.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
A Gradle plugin to (help) build ZAP add-ons.
44

5-
The plugin requires at least Java 17 and Gradle 8.8.
5+
The plugin requires at least Java 17 and Gradle 8.13.

apigen/apigen.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repositories {
1212
description = "The utility to help generate ZAP API client files for an add-on."
1313

1414
dependencies {
15-
compileOnly("org.zaproxy:zap:2.13.0")
15+
compileOnly("org.zaproxy:zap:2.16.0")
1616
}
1717

1818
tasks.jar.configure {

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
plugins {
22
`kotlin-dsl`
3-
id("com.gradle.plugin-publish") version "1.2.1"
3+
id("com.gradle.plugin-publish") version "1.3.1"
44

55
id("com.diffplug.spotless")
66
id("org.zaproxy.common")
77
}
88

99
group = "org.zaproxy.gradle"
10-
version = "0.13.0-SNAPSHOT"
10+
version = "0.13.0"
1111

1212
dependencies {
1313
implementation("commons-codec:commons-codec:1.17.1")
@@ -21,7 +21,7 @@ dependencies {
2121
val jgitVersion = "7.1.0.202411261347-r"
2222
implementation("org.eclipse.jgit:org.eclipse.jgit:$jgitVersion")
2323
implementation("org.eclipse.jgit:org.eclipse.jgit.archive:$jgitVersion")
24-
implementation("org.zaproxy:zap-clientapi:1.14.0")
24+
implementation("org.zaproxy:zap-clientapi:1.16.0")
2525
implementation("org.kohsuke:github-api:1.326")
2626
// Include annotations used by the above library to avoid compiler warnings.
2727
compileOnly("com.google.code.findbugs:findbugs-annotations:3.0.1")

gradle/wrapper/gradle-wrapper.jar

252 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
3+
distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -84,7 +86,7 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
8890

8991
# Use the maximum available, or set MAX_FD != -1 to use that value.
9092
MAX_FD=maximum
@@ -203,7 +205,7 @@ fi
203205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204206

205207
# Collect all arguments for the java command:
206-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207209
# and any embedded shellness will be escaped.
208210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209211
# treated as '${Hostname}' itself on the command line.

gradlew.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("org.zaproxy.common.settings") version "0.3.0"
2+
id("org.zaproxy.common.settings") version "0.5.0"
33

44
id("com.diffplug.spotless") version "6.25.0" apply false
55
}

src/main/java/org/zaproxy/gradle/addon/apigen/tasks/GenerateApiClientFiles.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.util.Collections;
3131
import java.util.List;
3232
import java.util.Properties;
33+
import javax.inject.Inject;
3334
import org.gradle.api.DefaultTask;
3435
import org.gradle.api.file.ConfigurableFileCollection;
3536
import org.gradle.api.file.RegularFileProperty;
@@ -42,6 +43,7 @@
4243
import org.gradle.api.tasks.PathSensitive;
4344
import org.gradle.api.tasks.PathSensitivity;
4445
import org.gradle.api.tasks.TaskAction;
46+
import org.gradle.process.ExecOperations;
4547

4648
/** A task to generate the API client files of an add-on. */
4749
public class GenerateApiClientFiles extends DefaultTask {
@@ -57,16 +59,22 @@ public class GenerateApiClientFiles extends DefaultTask {
5759
private final Property<File> baseDir;
5860
private final Property<String> language;
5961
private final ConfigurableFileCollection classpath;
62+
private final ObjectFactory objects;
6063

6164
public GenerateApiClientFiles() {
62-
ObjectFactory objects = getProject().getObjects();
65+
objects = getProject().getObjects();
6366
api = objects.property(String.class);
6467
options = objects.property(String.class);
6568
messages = objects.fileProperty();
6669
baseDir = objects.property(File.class);
6770
baseDir.set(getProject().getRootDir().getParentFile());
6871
language = objects.property(String.class).value(ALL_LANGUAGES);
69-
classpath = getProject().files();
72+
classpath = objects.fileCollection();
73+
}
74+
75+
@Inject
76+
protected ExecOperations getExecOperations() {
77+
throw new UnsupportedOperationException();
7078
}
7179

7280
@Input
@@ -138,10 +146,11 @@ public void generate() throws IOException {
138146
conf.store(out, null);
139147
}
140148

141-
getProject()
149+
getExecOperations()
142150
.javaexec(
143151
spec -> {
144-
spec.setClasspath(getProject().files(classpath, apiGenJar.toFile()));
152+
spec.setClasspath(
153+
objects.fileCollection().from(classpath, apiGenJar.toFile()));
145154
spec.setWorkingDir(wd.toFile());
146155
spec.getMainClass().set("org.zaproxy.zap.extension.api.ApiGenerator");
147156
});

0 commit comments

Comments
 (0)