Switch Java compiler source/target to 1.8

Resolves: RHEL-52689
This commit is contained in:
Marian Koncek 2024-02-21 12:18:09 +01:00 committed by Mikolaj Izdebski
parent 0fc4a51a06
commit 8c8509433b
2 changed files with 32 additions and 3 deletions

View File

@ -0,0 +1,25 @@
From 202fbfcbb7c179dcd40e7b296604febb10a8c256 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Wed, 21 Feb 2024 12:13:45 +0100
Subject: [PATCH] Set Java source/target to 1.8
---
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.xml b/build.xml
index d5c2b54..cb1dfd1 100644
--- a/build.xml
+++ b/build.xml
@@ -57,7 +57,7 @@
token="+ version_str"
value='+ "v0.11b ${cupversion} (SVN rev ${svnversion})"'>
</replace>
- <javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" debug="on" source="1.5" target="1.5">
+ <javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" debug="on" source="1.8" target="1.8">
<classpath refid="libraries"/>
</javac>
</target>
--
2.43.0

View File

@ -20,6 +20,7 @@ Source2: %{name}-MANIFEST.MF
Source4: %{name}-runtime-MANIFEST.MF
Patch0: %{name}-build.patch
Patch1: 0002-Set-Java-source-target-to-1.8.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
@ -52,9 +53,8 @@ Documentation for java_cup.
%prep
%setup -q
%patch0 -b .build
sed -i '/<javac/s/1.5/1.7/g' build.xml
%patch 0 -b .build
%patch 1 -p1
# remove all binary files
find -name "*.class" -delete
@ -100,6 +100,10 @@ jar ufm dist/java-cup-%{pkg_version}-runtime.jar %{SOURCE4}
%license licence.txt
%changelog
* Mon Aug 05 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:0.11b-29
- Switch Java compiler source/target to 1.8
- Resolves: RHEL-52689
* Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 1:0.11b-29
- Bump release for Aug 2024 java mass rebuild