Skip to content

Commit

Permalink
feat(gradle): ✨ Adjust build for ZGC and Java21 (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored Sep 22, 2023
1 parent 15f2119 commit d44c63a
Show file tree
Hide file tree
Showing 258 changed files with 12,346 additions and 11,728 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
node-version: '18.4'
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
with:
distribution: 'temurin'
java-version: '19'
distribution: 'oracle'
java-version: '21'
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc # v2
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
with:
java-version: 17
distribution: microsoft
java-version: 21
distribution: oracle
- name: Run Tests
run: |
gradle test
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
import java.util.stream.Collectors;

/**
* This defines a converter interface. A converter is used to convert an object of type {@code T} to an object of type {@code R}.
* This is mostly used to convert entities to DTOs and vice versa.
* This defines a converter interface. A converter is used to convert an object of type {@code T} to
* an object of type {@code R}. This is mostly used to convert entities to DTOs and vice versa.
*
* @param <T> the source type
* @param <R> the target type
*/
public interface Converter<T, R> {

/**
* Converts the given source object to a target object.
* @param source the source object
* @return the target object or {@code null} if the source object is {@code null}
*/
R convert(T content);
/**
* Converts the given source object to a target object.
*
* @param source the source object

Check warning on line 19 in application/src/main/java/io/github/martinwitt/laughing_train/application/base/converter/Converter.java

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Declaration has problems in Javadoc references

Cannot resolve symbol `source`
* @return the target object or {@code null} if the source object is {@code null}
*/
R convert(T content);

default List<R> convert(Collection<T> contents) {
return contents.stream().map(this::convert).collect(Collectors.toList());
}
default List<R> convert(Collection<T> contents) {
return contents.stream().map(this::convert).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spotless {
target '*.gradle' // default target of groovyGradle
}
java {
palantirJavaFormat()
googleJavaFormat()
}
}

Expand All @@ -70,7 +70,7 @@ compileJava {
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
}
}
test {
Expand Down
Loading

0 comments on commit d44c63a

Please sign in to comment.