Skip to content

Commit

Permalink
Merge pull request #15 from miguelaferreira/upgrade-gradle-7.3.rc-5
Browse files Browse the repository at this point in the history
Upgrade gradle to 7.3-rc-5 and Graalvm to 21.3.0-r17
  • Loading branch information
miguelaferreira authored Nov 6, 2021
2 parents 5ab8325 + 46ea9c1 commit 84bfd4d
Show file tree
Hide file tree
Showing 11 changed files with 242 additions and 164 deletions.
4 changes: 4 additions & 0 deletions .github/scripts/merge-native-image-build-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ mkdir -p "${output_dir}"

[[ -d "${native_image_config_dir}" ]] || exit 1

say "Make reflexion config compatible with native-image-configure binaries"
grep -l -R "queryA" "${native_image_config_dir}" | xargs sed -i -e "s/queryA/a/"
grep -l -R "queriedM" "${native_image_config_dir}" | xargs sed -i -e "s/queriedM/m/"

say "Merging native-image build config"
input_dirs=""
for config_dir in "${native_image_config_dir}"/*/*; do
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
- name: "Install GraalVM"
uses: DeLaGuardo/[email protected]
with:
graalvm: '21.2.0'
java: 'java16'
graalvm: '21.3.0'
java: 'java17'
arch: 'amd64'

- name: Autobuild
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
path: |
~/.gradle
${GITHUB_WORKSPACE}/.gradle
key: ${{ matrix.os }}-devex-release-java16-graal-21.2.0
key: ${{ matrix.os }}-devex-release-java16-graal-21.3.0-r17
- name: "[${{ runner.os }}] Install GraalVM"
uses: DeLaGuardo/[email protected]
with:
graalvm: '21.2.0'
java: 'java16'
graalvm: '21.3.0'
java: 'java17'
arch: 'amd64'
- name: "[${{ runner.os }}] Install native-image"
run: gu install native-image
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
~/.gradle
${GITHUB_WORKSPACE}/.gradle
~/.cache/pip/
key: ${{ runner.os }}-devex-development-java16-graal-21.2.0
key: ${{ runner.os }}-devex-development-java16-graal-21.3.0-r17
- name: "Install GraalVM"
uses: DeLaGuardo/[email protected]
with:
graalvm: '21.2.0'
java: 'java16'
graalvm: '21.3.0'
java: 'java17'
arch: 'amd64'
- name: "Install native-image"
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ curl -s "https://get.sdkman.io" | bash
Then install GraalVM.

```bash
sdk install java 21.2.0.r16-grl
sdk install java 21.3.0.r17-grl
```

Load the installed GraalVM on the current terminal.

```bash
sdk use java 21.2.0.r16-grl
sdk use java 21.3.0.r17-grl
```

To build native images using GraalVM it is necessary to install the `native-image` tool.
Expand Down
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ dependencies {
implementation("io.micronaut.picocli:micronaut-picocli")
implementation("io.micronaut:micronaut-validation")

// patch vulnerable jackson dependency
constraints {
implementation("com.fasterxml.jackson.core:jackson-databind:2.9.10.6") {
because 'previous versions (com.fasterxml.jackson.core:[email protected]) has known vulnerabilities'
}
}


implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'ch.qos.logback:logback-classic:1.2.3'
Expand Down Expand Up @@ -64,8 +71,8 @@ application {

java {
modularity.inferModulePath.set(true)
sourceCompatibility = JavaVersion.toVersion("16")
targetCompatibility = JavaVersion.toVersion("16")
sourceCompatibility = JavaVersion.toVersion("17")
targetCompatibility = JavaVersion.toVersion("17")
}

test {
Expand All @@ -88,6 +95,12 @@ test {
// }
}

// Workaround for using gradle 7.3 with java 17
// src: https://github.com/micronaut-projects/micronaut-gradle-plugin/issues/296
tasks.withType(Test).configureEach {
useJUnitPlatform()
}

processResources {
from("VERSION")
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-rc-5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 84bfd4d

Please sign in to comment.