Skip to content

Commit

Permalink
Merge pull request #80 from thc202/release/0.12.0
Browse files Browse the repository at this point in the history
Release version 0.12.0
  • Loading branch information
kingthorin authored Dec 4, 2024
2 parents ce265c6 + 003458a commit da238cf
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [11, 21, 22]
java: [17, 21, 22]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew publishPlugin
env:
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.12.0] - 2024-12-04
### Changed
- The minimum Java version required is now Java 17.
- Update dependencies to support newer Java versions.

## [0.11.0] - 2024-06-17
### Changed
Expand Down Expand Up @@ -236,7 +239,7 @@ Provided by the plugin:
with a `ZapVersions.xml` from an add-on.


[Unreleased]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.11.0...HEAD
[0.12.0]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.11.0...v0.12.0
[0.11.0]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.10.0...v0.11.0
[0.10.0]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.9.0...v0.10.0
[0.9.0]: https://github.com/zaproxy/gradle-plugin-add-on/compare/v0.8.0...v0.9.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

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

The plugin requires at least Java 11 and Gradle 8.8.
The plugin requires at least Java 17 and Gradle 8.8.
23 changes: 12 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ plugins {
}

group = "org.zaproxy.gradle"
version = "0.12.0-SNAPSHOT"
version = "0.12.0"

dependencies {
implementation("commons-codec:commons-codec:1.15")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9")
val flexmarkVersion = "0.42.8"
implementation("commons-codec:commons-codec:1.17.1")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.18.2")
val flexmarkVersion = "0.64.8"
implementation("com.vladsch.flexmark:flexmark-java:$flexmarkVersion")
implementation("com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:$flexmarkVersion")
implementation("com.vladsch.flexmark:flexmark-ext-gfm-tasklist:$flexmarkVersion")
implementation("com.vladsch.flexmark:flexmark-ext-tables:$flexmarkVersion")
implementation("io.github.classgraph:classgraph:4.8.36")
val jgitVersion = "5.6.0.201912101111-r"
implementation("io.github.classgraph:classgraph:4.8.179")
val jgitVersion = "7.1.0.202411261347-r"
implementation("org.eclipse.jgit:org.eclipse.jgit:$jgitVersion")
implementation("org.eclipse.jgit:org.eclipse.jgit.archive:$jgitVersion")
implementation("org.zaproxy:zap-clientapi:1.14.0")
implementation("org.kohsuke:github-api:1.95")
implementation("org.kohsuke:github-api:1.326")
// Include annotations used by the above library to avoid compiler warnings.
compileOnly("com.google.code.findbugs:findbugs-annotations:3.0.1")
compileOnly("com.infradna.tool:bridge-method-annotation:1.18") {
exclude(group = "org.jenkins-ci")
}
implementation("com.github.zafarkhaja:java-semver:0.9.0")
implementation("com.github.zafarkhaja:java-semver:0.10.2")
}

tasks.jar {
Expand All @@ -41,12 +41,13 @@ tasks.jar {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
val javaVersion = JavaVersion.VERSION_17
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

gradlePlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import java.io.File;
import java.io.IOException;
import org.zaproxy.gradle.addon.internal.BuildException;

/** The release state computed from {@code gradle.properties} files. */
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@JsonInclude(value = Include.NON_EMPTY)
public class ReleaseState {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void pullRequest() throws Exception {
.head(ghUser.getName() + ":" + getBranchName().get())
.state(GHIssueState.OPEN)
.list()
.asList();
.toList();
String description =
getPullRequestDescription().getOrElse(getCommitDescription().get());
if (pulls.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private static String bumpVersion(String version) {
}

try {
return Version.valueOf(version).incrementMinorVersion().toString();
return Version.parse(version).nextMinorVersion().toString();
} catch (IllegalArgumentException | ParseException e) {
throw new InvalidUserDataException(
"Failed to parse the current version: " + version, e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
import com.vladsch.flexmark.ext.tables.TablesExtension;
import com.vladsch.flexmark.html.HtmlRenderer;
import com.vladsch.flexmark.parser.Parser;
import com.vladsch.flexmark.util.options.MutableDataSet;
import com.vladsch.flexmark.util.data.MutableDataSet;
import java.io.IOException;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.Arrays;
import org.gradle.api.DefaultTask;
Expand Down Expand Up @@ -80,10 +79,7 @@ public void convert() throws IOException {
Parser parser = Parser.builder(options).build();
HtmlRenderer renderer = HtmlRenderer.builder(options).build();

String changes =
new String(
Files.readAllBytes(markdown.get().getAsFile().toPath()),
StandardCharsets.UTF_8);
String changes = Files.readString(markdown.get().getAsFile().toPath());
try (Writer writer = Files.newBufferedWriter(html.get().getAsFile().toPath())) {
renderer.render(parser.parse(changes), writer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private static String bumpVersion(String version) {
}

try {
return Version.valueOf(version).incrementMinorVersion().toString();
return Version.parse(version).nextMinorVersion().toString();
} catch (IllegalArgumentException | ParseException e) {
throw new InvalidUserDataException(
"Failed to parse the current version: " + version, e);
Expand Down

0 comments on commit da238cf

Please sign in to comment.