Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update parent POM and BOM for JDK 17 and major library updates #232

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java_version: [ '11', '17', '20' ]
java_version: [ '17', '20' ]
steps:
# Check out the project
- uses: actions/checkout@v3
Expand All @@ -33,7 +33,7 @@ jobs:
# Cache all the things
- name: Cache SonarCloud packages
uses: actions/cache@v3
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
Expand All @@ -54,16 +54,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
run: mvn -B -V compile

# Run tests when Java version > 11 (Sonar runs tests and analysis on JDK 11)
# Run tests when Java version > 17 (Sonar runs tests and analysis on JDK 17)
- name: Run tests
if: ${{ matrix.java_version != '11' }}
if: ${{ matrix.java_version != '17' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
run: mvn -B -V verify

# Run Sonar Analysis (on Java version 11 only)
# Run Sonar Analysis (on Java version 17 only)
- name: Analyze with SonarCloud
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>org.kiwiproject</groupId>
<artifactId>kiwi-parent</artifactId>
<version>2.0.20</version>
<version>3.0.1</version>
</parent>

<artifactId>dropwizard-config-providers</artifactId>
<version>1.1.14-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand All @@ -30,11 +30,11 @@

<properties>
<!-- Versions for required dependencies -->
<kiwi.version>2.7.0</kiwi.version>
<kiwi-bom.version>1.1.1</kiwi-bom.version>
<kiwi.version>3.0.0</kiwi.version>
<kiwi-bom.version>2.0.0</kiwi-bom.version>

<!-- Versions for test dependencies -->
<kiwi-test.version>2.4.0</kiwi-test.version>
<kiwi-test.version>3.0.0</kiwi-test.version>

<!-- Sonar properties -->
<sonar.projectKey>kiwiproject_dropwizard-config-providers</sonar.projectKey>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private ElucidationConfigProvider(ExternalConfigProvider externalConfigProvider,

var enabledValue = enabledResolution.getValue();

this.enabled = !isNull(enabledValue) && enabledValue;
this.enabled = Boolean.TRUE.equals(enabledValue);
this.enabledResolvedBy = enabledResolution.getResolvedBy();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public <T> ResolverResult<T> resolveExternalProperty(String propertyKey,
}

/**
* Will check if a given {@link ExternalConfigProvider} is null and return a new one if so. Otherwise return the one
* passed in.
* Will check if the given {@link ExternalConfigProvider} is null and return a new one if so. Otherwise, return the
* one passed in.
*
* @param provided an {@link ExternalConfigProvider} to test for null
* @return A new {@link ExternalConfigProvider} if the given {@code provided} is null or {@code provided}
Expand Down