Skip to content

Commit

Permalink
chore(deps): bump eclipse-temurin from 16-alpine to 17-alpine (#127)
Browse files Browse the repository at this point in the history
* chore(deps): bump eclipse-temurin from 16-alpine to 17-alpine

Bumps eclipse-temurin from 16-alpine to 17-alpine.

---
updated-dependencies:
- dependency-name: eclipse-temurin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: Ignore Dockerfile

* chore: バージョンアップ対応用のスクリプトを追加

* chore: Javaのバージョンを17にアップグレード

* chore: JDKのアップグレード方法を追記

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jiro4989 <[email protected]>
  • Loading branch information
dependabot[bot] and jiro4989 authored Jan 24, 2022
1 parent 943efaa commit 9f7f31f
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ name: release

env:
APP_NAME: 'tkfm'
JAVA_VERSION: '16'
JAVAFX_VERSION: '16'
JAVA_VERSION: '17'
JAVAFX_VERSION: '17'

defaults:
run:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ name: test
- 'LICENSE'
- 'README.*'
- 'docs/*'
- 'Dockerfile'
branches:
- master
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.*'
- 'docs/*'
- 'Dockerfile'

env:
APP_NAME: 'tkfm'
JAVA_VERSION: '16'
JAVAFX_VERSION: '16'
JAVA_VERSION: '17'
JAVAFX_VERSION: '17'

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:16-alpine
FROM eclipse-temurin:17-alpine

COPY . /app
WORKDIR /app
10 changes: 10 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@ git tag
git tag {新しいタグ}
----

=== JDKのアップグレード

`./script/update_jdk_version.sh` を使う。
以下はJDK17にアップグレードする場合の例。

[source,bash]
----
./script/update_jdk_version.sh 17
----

=== 余談

初期はJava + JavaFXのみで作ってあったけれど
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
}

sourceCompatibility = 16
targetCompatibility = 16
sourceCompatibility = 17
targetCompatibility = 17

application {
// Define the main class for the application.
Expand All @@ -112,11 +112,11 @@ compileJava {
}

compileKotlin {
kotlinOptions.jvmTarget = "16"
kotlinOptions.jvmTarget = "17"
}

compileTestKotlin {
kotlinOptions.jvmTarget = "16"
kotlinOptions.jvmTarget = "17"
}

javafx {
Expand Down
2 changes: 1 addition & 1 deletion script/build_for_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -eux

APP_NAME="tkfm" JAVAFX_VERSION=16 OS_NAME=linux ARCHIVE_CMD="tar czf" ARTIFACT_EXT=.tar.gz ENTRYPOINT_SCRIPT_EXT="" VERSION="0.0.0-SNAPSHOT" ./script/create_artifact.sh
APP_NAME="tkfm" JAVAFX_VERSION=17 OS_NAME=linux ARCHIVE_CMD="tar czf" ARTIFACT_EXT=.tar.gz ENTRYPOINT_SCRIPT_EXT="" VERSION="0.0.0-SNAPSHOT" ./script/create_artifact.sh
26 changes: 26 additions & 0 deletions script/update_jdk_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -eu

java_version=$1

sed -i -E \
-e "/(source|target)Compatibility/s/[0-9]+/${java_version}/g" \
-e "/jvmTarget/s/[0-9]+/${java_version}/g" \
build.gradle

sed -i -E \
-e "s/(JAVAFX_VERSION=)[0-9]+/\1${java_version}/g" \
script/build_for_linux.sh

find src \
-name '*.fxml' \
-exec \
sed -i -E \
-e "s^(http://javafx.com/javafx/)[0-9]+^\1${java_version}^" {} \;

find .github/workflows \
-name '*.yml' \
-exec \
sed -i -E \
-e "/JAVA(FX)?_VERSION:/s/[0-9]+/${java_version}/g" {} \;
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<VBox xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.jiro4989.tkfm.controller.CropImageViewController">
<VBox xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.jiro4989.tkfm.controller.CropImageViewController">
<children>
<AnchorPane>
<children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<VBox prefWidth="400.0" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.jiro4989.tkfm.controller.ImageFormatViewController">
<VBox prefWidth="400.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.jiro4989.tkfm.controller.ImageFormatViewController">
<children>
<GridPane>
<columnConstraints>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/com/jiro4989/tkfm/fxml/main_view.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>

<BorderPane prefHeight="877.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.jiro4989.tkfm.controller.MainViewController">
<BorderPane prefHeight="877.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.jiro4989.tkfm.controller.MainViewController">
<top>
<MenuBar id="menuBar" prefHeight="30.0" prefWidth="1280.0">
<menus>
Expand Down

0 comments on commit 9f7f31f

Please sign in to comment.