Repository: beeware/briefcase
Pull request #1462 (2023-09-23 17:07:20)

Bump JDK to 17.0.8.1+1
## Changes
- Bump JDK from 17.0.8+7 to 17.0.8.1+1

## Notes
- I'm calling the trailing number a "BUILD"...but is this a build per se...? this is not clear to me...

## PR Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [x] All new features have been tested
- [x] All new features have been documented
- [X] I have read the **CONTRIBUTING.md** file
- [X] I will abide by the code of conduct


Patch:
diff --git a/changes/1398.feature.rst b/changes/1398.misc.rst
similarity index 100%
rename from changes/1398.feature.rst
rename to changes/1398.misc.rst
diff --git a/changes/1462.feature.rst b/changes/1462.feature.rst
new file mode 100644
index 00000000..9d7110b5
--- /dev/null
+++ b/changes/1462.feature.rst
@@ -0,0 +1,1 @@
+The Java JDK version was upgraded to 17.0.8.1+1.
diff --git a/src/briefcase/integrations/java.py b/src/briefcase/integrations/java.py
index a9e3b4cd..c9108020 100644
--- a/src/briefcase/integrations/java.py
+++ b/src/briefcase/integrations/java.py
@@ -17,10 +17,10 @@ class JDK(ManagedTool):
     name = "java"
     full_name = "Java JDK"
 
-    # Latest OpenJDK as of August 2023: https://adoptium.net/temurin/releases/
+    # Latest OpenJDK as of September 2023: https://adoptium.net/temurin/releases/
     JDK_MAJOR_VER = "17"
-    JDK_RELEASE = "17.0.8"
-    JDK_BUILD = "7"
+    JDK_RELEASE = "17.0.8.1"
+    JDK_BUILD = "1"
     JDK_INSTALL_DIR_NAME = f"java{JDK_MAJOR_VER}"
 
     def __init__(self, tools: ToolCache, java_home: Path):


Test patch:
diff --git a/tests/integrations/java/conftest.py b/tests/integrations/java/conftest.py
index 71ec7dfb..d790106e 100644
--- a/tests/integrations/java/conftest.py
+++ b/tests/integrations/java/conftest.py
@@ -6,7 +6,8 @@ from briefcase.integrations.base import ToolCache
 from briefcase.integrations.download import Download
 from briefcase.integrations.subprocess import Subprocess
 
-JDK_RELEASE = "17.0.8"
+JDK_RELEASE = "17.0.8.1"
+JDK_BUILD = "1"
 
 
 @pytest.fixture
diff --git a/tests/integrations/java/test_JDK__upgrade.py b/tests/integrations/java/test_JDK__upgrade.py
index 920b1dfb..5ef60345 100644
--- a/tests/integrations/java/test_JDK__upgrade.py
+++ b/tests/integrations/java/test_JDK__upgrade.py
@@ -13,7 +13,7 @@ from briefcase.exceptions import (
 from briefcase.integrations.base import ToolCache
 from briefcase.integrations.java import JDK
 
-from .conftest import JDK_RELEASE
+from .conftest import JDK_BUILD, JDK_RELEASE
 
 
 @pytest.fixture
@@ -67,7 +67,7 @@ def test_existing_install(mock_tools, tmp_path):
     mock_tools.download.file.return_value = archive
 
     # Create a directory to make it look like Java was downloaded and unpacked.
-    (tmp_path / "tools" / f"jdk-{JDK_RELEASE}+7").mkdir(parents=True)
+    (tmp_path / "tools" / f"jdk-{JDK_RELEASE}+{JDK_BUILD}").mkdir(parents=True)
 
     # Create an SDK wrapper
     jdk = JDK(mock_tools, java_home=java_home)
@@ -81,7 +81,7 @@ def test_existing_install(mock_tools, tmp_path):
     # A download was initiated
     mock_tools.download.file.assert_called_with(
         url="https://github.com/adoptium/temurin17-binaries/releases/download/"
-        f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+        f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
         download_path=tmp_path / "tools",
         role="Java 17 JDK",
     )
@@ -116,7 +116,7 @@ def test_macOS_existing_install(mock_tools, tmp_path):
     mock_tools.download.file.return_value = archive
 
     # Create a directory to make it look like Java was downloaded and unpacked.
-    (tmp_path / "tools" / f"jdk-{JDK_RELEASE}+7").mkdir(parents=True)
+    (tmp_path / "tools" / f"jdk-{JDK_RELEASE}+{JDK_BUILD}").mkdir(parents=True)
 
     # Create an SDK wrapper
     jdk = JDK(mock_tools, java_home=java_home)
@@ -130,7 +130,7 @@ def test_macOS_existing_install(mock_tools, tmp_path):
     # A download was initiated
     mock_tools.download.file.assert_called_with(
         url="https://github.com/adoptium/temurin17-binaries/releases/download/"
-        f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_mac_hotspot_{JDK_RELEASE}_7.tar.gz",
+        f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_mac_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
         download_path=tmp_path / "tools",
         role="Java 17 JDK",
     )
@@ -172,7 +172,7 @@ def test_download_fail(mock_tools, tmp_path):
     # A download was initiated
     mock_tools.download.file.assert_called_with(
         url="https://github.com/adoptium/temurin17-binaries/releases/download/"
-        f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+        f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
         download_path=tmp_path / "tools",
         role="Java 17 JDK",
     )
@@ -214,7 +214,7 @@ def test_unpack_fail(mock_tools, tmp_path):
     # A download was initiated
     mock_tools.download.file.assert_called_with(
         url="https://github.com/adoptium/temurin17-binaries/releases/download/"
-        f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+        f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
         download_path=tmp_path / "tools",
         role="Java 17 JDK",
     )
diff --git a/tests/integrations/java/test_JDK__verify.py b/tests/integrations/java/test_JDK__verify.py
index b3817510..ec7bdaf5 100644
--- a/tests/integrations/java/test_JDK__verify.py
+++ b/tests/integrations/java/test_JDK__verify.py
@@ -15,7 +15,7 @@ from briefcase.exceptions import (
 )
 from briefcase.integrations.java import JDK
 
-from .conftest import JDK_RELEASE
+from .conftest import JDK_BUILD, JDK_RELEASE
 
 CALL_JAVA_HOME = mock.call(["/usr/libexec/java_home"])
 
@@ -406,7 +406,7 @@ def test_unparseable_javac_version(mock_tools, host_os, java_home, tmp_path, cap
             "Darwin",
             "x86_64",
             "https://github.com/adoptium/temurin17-binaries/releases/download/"
-            f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_mac_hotspot_{JDK_RELEASE}_7.tar.gz",
+            f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_mac_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
             "java17/Contents/Home",
             False,
         ),
@@ -414,7 +414,7 @@ def test_unparseable_javac_version(mock_tools, host_os, java_home, tmp_path, cap
             "Darwin",
             "arm64",
             "https://github.com/adoptium/temurin17-binaries/releases/download/"
-            f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_aarch64_mac_hotspot_{JDK_RELEASE}_7.tar.gz",
+            f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_aarch64_mac_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
             "java17/Contents/Home",
             False,
         ),
@@ -422,7 +422,7 @@ def test_unparseable_javac_version(mock_tools, host_os, java_home, tmp_path, cap
             "Linux",
             "x86_64",
             "https://github.com/adoptium/temurin17-binaries/releases/download/"
-            f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+            f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
             "java17",
             False,
         ),
@@ -430,7 +430,7 @@ def test_unparseable_javac_version(mock_tools, host_os, java_home, tmp_path, cap
             "Linux",
             "aarch64",
             "https://github.com/adoptium/temurin17-binaries/releases/download/"
-            f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_aarch64_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+            f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_aarch64_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
             "java17",
             False,
         ),
@@ -438,7 +438,7 @@ def test_unparseable_javac_version(mock_tools, host_os, java_home, tmp_path, cap
             "Linux",
             "aarch64",
             "https://github.com/adoptium/temurin17-binaries/releases/download/"
-            f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_arm_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+            f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_arm_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
             "java17",
             True,
         ),
@@ -446,7 +446,7 @@ def test_unparseable_javac_version(mock_tools, host_os, java_home, tmp_path, cap
             "Linux",
             "armv7l",
             "https://github.com/adoptium/temurin17-binaries/releases/download/"
-            f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_arm_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+            f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_arm_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
             "java17",
             False,
         ),
@@ -454,7 +454,7 @@ def test_unparseable_javac_version(mock_tools, host_os, java_home, tmp_path, cap
             "Linux",
             "armv8l",
             "https://github.com/adoptium/temurin17-binaries/releases/download/"
-            f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_arm_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+            f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_arm_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
             "java17",
             False,
         ),
@@ -462,7 +462,7 @@ def test_unparseable_javac_version(mock_tools, host_os, java_home, tmp_path, cap
             "Windows",
             "AMD64",
             "https://github.com/adoptium/temurin17-binaries/releases/download/"
-            f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_windows_hotspot_{JDK_RELEASE}_7.zip",
+            f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_windows_hotspot_{JDK_RELEASE}_{JDK_BUILD}.zip",
             "java17",
             False,
         ),
@@ -494,7 +494,7 @@ def test_successful_jdk_download(
     mock_tools.download.file.return_value = archive
 
     # Create a directory to make it look like Java was downloaded and unpacked.
-    (tmp_path / "tools" / f"jdk-{JDK_RELEASE}+7").mkdir(parents=True)
+    (tmp_path / "tools" / f"jdk-{JDK_RELEASE}+{JDK_BUILD}").mkdir(parents=True)
 
     # Invoke the verify call
     JDK.verify(mock_tools)
@@ -549,7 +549,7 @@ def test_jdk_download_failure(mock_tools, tmp_path):
     # That download was attempted
     mock_tools.download.file.assert_called_with(
         url="https://github.com/adoptium/temurin17-binaries/releases/download/"
-        f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+        f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
         download_path=tmp_path / "tools",
         role="Java 17 JDK",
     )
@@ -577,7 +577,7 @@ def test_invalid_jdk_archive(mock_tools, tmp_path):
     # The download occurred
     mock_tools.download.file.assert_called_with(
         url="https://github.com/adoptium/temurin17-binaries/releases/download/"
-        f"jdk-{JDK_RELEASE}+7/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_7.tar.gz",
+        f"jdk-{JDK_RELEASE}+{JDK_BUILD}/OpenJDK17U-jdk_x64_linux_hotspot_{JDK_RELEASE}_{JDK_BUILD}.tar.gz",
         download_path=tmp_path / "tools",
         role="Java 17 JDK",
     )