public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mikolaj Izdebski <mizdebsk@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/google-gson] epel10: Update to upstream version 2.12.1
Date: Mon, 17 Aug 2026 12:39:11 GMT [thread overview]
Message-ID: <178697035143.1.14744408519502098774.rpms-google-gson-bf30d30b657b@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/google-gson
Branch : epel10
Commit : bf30d30b657bcc3370af2790ecde50b07407aa54
Author : Mikolaj Izdebski <mizdebsk@redhat.com>
Date : 2025-02-17T07:26:12+01:00
Stats : +31/-145 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/google-gson/c/bf30d30b657bcc3370af2790ecde50b07407aa54?branch=epel10
Log:
Update to upstream version 2.12.1
---
diff --git a/.gitignore b/.gitignore
index 789b4de..5fd34e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ google-gson-2.2.1.tar.xz
/gson-parent-2.9.0.tar.gz
/gson-parent-2.9.1.tar.gz
/gson-parent-2.10.1.tar.gz
+/gson-parent-2.12.1.tar.gz
diff --git a/0002-Also-export-internal-packages-in-OSGi-metadata.patch b/0002-Also-export-internal-packages-in-OSGi-metadata.patch
deleted file mode 100644
index d6dab1e..0000000
--- a/0002-Also-export-internal-packages-in-OSGi-metadata.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From ad012fa6acc53560a07d05676aa22d1afc66bf22 Mon Sep 17 00:00:00 2001
-From: Mat Booth <mat.booth@redhat.com>
-Date: Thu, 27 Aug 2020 10:52:58 +0100
-Subject: [PATCH 2/4] Also export internal packages in OSGi metadata
-
----
- gson/bnd.bnd | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/gson/bnd.bnd b/gson/bnd.bnd
-index 7706d8a..8469930 100644
---- a/gson/bnd.bnd
-+++ b/gson/bnd.bnd
-@@ -13,4 +13,7 @@ Import-Package: sun.misc;resolution:=optional,*
- com.google.gson,\
- com.google.gson.annotations,\
- com.google.gson.reflect,\
-- com.google.gson.stream
-+ com.google.gson.stream,\
-+ com.google.gson.internal;x-internal:=true,\
-+ com.google.gson.internal.bind;x-internal:=true,\
-+ com.google.gson.internal.bind.util;x-internal:=true
---
-2.26.2
-
diff --git a/0004-This-commit-added-a-dependency-on-templating-maven-p.patch b/0004-This-commit-added-a-dependency-on-templating-maven-p.patch
deleted file mode 100644
index e4863da..0000000
--- a/0004-This-commit-added-a-dependency-on-templating-maven-p.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 7bc6b3dae1b948a40f81223acd8eb41e52240307 Mon Sep 17 00:00:00 2001
-From: Mat Booth <mat.booth@redhat.com>
-Date: Thu, 27 Aug 2020 11:31:46 +0100
-Subject: [PATCH 4/4] This commit added a dependency on
- templating-maven-plugin, we don't want it nor need it, so we revert it
- https://github.com/google/gson/commit/d84e26d
-
-delete mode 100644 gson/src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java
-delete mode 100644 gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
-delete mode 100644 gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java
-
---- ./gson/src/main/java/com/google/gson/internal/reflect/ReflectionHelper.java.orig 2023-03-27 12:12:11.824878326 +0100
-+++ ./gson/src/main/java/com/google/gson/internal/reflect/ReflectionHelper.java 2023-03-27 12:14:36.157362353 +0100
-@@ -1,7 +1,6 @@
- package com.google.gson.internal.reflect;
-
- import com.google.gson.JsonIOException;
--import com.google.gson.internal.GsonBuildConfig;
- import java.lang.reflect.AccessibleObject;
- import java.lang.reflect.Constructor;
- import java.lang.reflect.Field;
-@@ -150,7 +149,7 @@ public class ReflectionHelper {
-
- public static RuntimeException createExceptionForUnexpectedIllegalAccess(
- IllegalAccessException exception) {
-- throw new RuntimeException("Unexpected IllegalAccessException occurred (Gson " + GsonBuildConfig.VERSION + ")."
-+ throw new RuntimeException("Unexpected IllegalAccessException occurred (Gson). "
- + " Certain ReflectionAccessFilter features require Java >= 9 to work correctly. If you are not using"
- + " ReflectionAccessFilter, report this to the Gson maintainers.",
- exception);
-@@ -160,7 +159,6 @@ public class ReflectionHelper {
- private static RuntimeException createExceptionForRecordReflectionException(
- ReflectiveOperationException exception) {
- throw new RuntimeException("Unexpected ReflectiveOperationException occurred"
-- + " (Gson " + GsonBuildConfig.VERSION + ")."
- + " To support Java records, reflection is utilized to read out information"
- + " about records. All these invocations happens after it is established"
- + " that records exist in the JVM. This exception is unexpected behavior.",
---- ./gson/src/main/java/com/google/gson/Gson.java.orig 2023-03-27 12:09:35.155438649 +0100
-+++ ./gson/src/main/java/com/google/gson/Gson.java 2023-03-27 12:11:25.244044921 +0100
-@@ -18,7 +18,6 @@ package com.google.gson;
-
- import com.google.gson.internal.ConstructorConstructor;
- import com.google.gson.internal.Excluder;
--import com.google.gson.internal.GsonBuildConfig;
- import com.google.gson.internal.LazilyParsedNumber;
- import com.google.gson.internal.Primitives;
- import com.google.gson.internal.Streams;
-@@ -568,7 +567,7 @@ public final class Gson {
- }
-
- if (candidate == null) {
-- throw new IllegalArgumentException("GSON (" + GsonBuildConfig.VERSION + ") cannot handle " + type);
-+ throw new IllegalArgumentException("GSON cannot handle " + type);
- }
-
- if (isInitialAdapterRequest) {
-@@ -842,8 +841,6 @@ public final class Gson {
- adapter.write(writer, src);
- } catch (IOException e) {
- throw new JsonIOException(e);
-- } catch (AssertionError e) {
-- throw new AssertionError("AssertionError (GSON " + GsonBuildConfig.VERSION + "): " + e.getMessage(), e);
- } finally {
- writer.setLenient(oldLenient);
- writer.setHtmlSafe(oldHtmlSafe);
-@@ -945,8 +942,6 @@ public final class Gson {
- Streams.write(jsonElement, writer);
- } catch (IOException e) {
- throw new JsonIOException(e);
-- } catch (AssertionError e) {
-- throw new AssertionError("AssertionError (GSON " + GsonBuildConfig.VERSION + "): " + e.getMessage(), e);
- } finally {
- writer.setLenient(oldLenient);
- writer.setHtmlSafe(oldHtmlSafe);
-@@ -1239,8 +1234,6 @@ public final class Gson {
- } catch (IOException e) {
- // TODO(inder): Figure out whether it is indeed right to rethrow this as JsonSyntaxException
- throw new JsonSyntaxException(e);
-- } catch (AssertionError e) {
-- throw new AssertionError("AssertionError (GSON " + GsonBuildConfig.VERSION + "): " + e.getMessage(), e);
- } finally {
- reader.setLenient(oldLenient);
- }
diff --git a/google-gson.spec b/google-gson.spec
index 30f3790..f47d0a5 100644
--- a/google-gson.spec
+++ b/google-gson.spec
@@ -1,28 +1,24 @@
+%bcond_with bootstrap
+
Name: google-gson
-Version: 2.10.1
+Version: 2.12.1
Release: %autorelease
Summary: Java lib for conversion of Java objects into JSON representation
# Automatically converted from old format: ASL 2.0 - review is highly recommended.
License: Apache-2.0
URL: https://github.com/google/gson
-Source0: https://github.com/google/gson/archive/gson-parent-%{version}.tar.gz
-
-# Internal packages are naughtily used by other packages in Fedora
-Patch1: 0002-Also-export-internal-packages-in-OSGi-metadata.patch
-# Remove dependency on unavailable templating-maven-plugin
-# Reverts upstream commit https://github.com/google/gson/commit/d84e26d
-Patch3: 0004-This-commit-added-a-dependency-on-templating-maven-p.patch
-
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
+Source0: https://github.com/google/gson/archive/gson-parent-%{version}.tar.gz
+
+BuildRequires: jurand
+%if %{with bootstrap}
+BuildRequires: javapackages-bootstrap
+%else
BuildRequires: maven-local
-BuildRequires: mvn(junit:junit)
-BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
-BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin)
-BuildRequires: bnd-maven-plugin
-BuildRequires: maven-resources-plugin
-BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind)
+BuildRequires: mvn(javax.annotation:jsr250-api)
+%endif
%description
Gson is a Java library that can be used to convert a Java object into its
@@ -37,10 +33,19 @@ Summary: API documentation for %{name}
This package contains the API documentation for %{name}.
%prep
-%setup -q -n gson-gson-parent-%{version}
-#rm ./gradle/wrapper/gradle-wrapper.jar
-%patch -P1 -p1
-%patch -P3 -p1
+%autosetup -p1 -C
+
+%pom_remove_plugin -r :maven-enforcer-plugin
+%pom_remove_plugin -r :spotless-maven-plugin
+%pom_remove_plugin -r :maven-artifact-plugin
+%pom_remove_plugin -r :maven-failsafe-plugin
+%pom_remove_plugin :bnd-maven-plugin gson
+%pom_remove_plugin :maven-jar-plugin gson
+%pom_remove_plugin :maven-compiler-plugin
+
+%pom_remove_dep -r :error_prone_annotations
+%java_remove_annotations gson extras -s \
+ -p com[.]google[.]errorprone[.]annotations[.] \
# The test EnumWithObfuscatedTest requires the plugins copy-rename-maven-plugin, proguard-maven-plugin and maven-resources-plugin to work correctly because it tests Gson interaction with a class obfuscated by ProGuard.
# https://github.com/google/gson/issues/2045
@@ -59,12 +64,7 @@ rm ./gson/src/test/java/com/google/gson/internal/bind/DefaultDateTypeAdapterTest
# Remove dependency on unavailable templating-maven-plugin
%pom_remove_plugin org.codehaus.mojo:templating-maven-plugin gson
-rm gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java
-rm gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
-
-# to fix error: package javax.annotation is not visible import javax.annotation.PostConstruct;
-rm extras/src/main/java/com/google/gson/typeadapters/PostConstructAdapterFactory.java
-rm extras/src/test/java/com/google/gson/typeadapters/PostConstructAdapterFactoryTest.java
+sed 's/${project.version}/%{version}/' gson/src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java >gson/src/main/java/com/google/gson/internal/GsonBuildConfig.java
#depends on com.google.caliper
%pom_disable_module metrics
@@ -72,15 +72,9 @@ rm extras/src/test/java/com/google/gson/typeadapters/PostConstructAdapterFactory
#depends on com.google.protobuf:protobuf-java:jar:4.0.0-rc-2 and com.google.truth:truth:jar:1.1.3
%pom_disable_module proto
-for x in `find | grep pom.xml` ; do
- if cat $x | grep -e "<maven.compiler.release>.*7" ; then
- sed "s;<maven.compiler.release>.*7.*;<maven.compiler.release>8</maven.compiler.release>;g" -i $x;
- fi
- if cat $x | grep -e "<failOnWarning>.*true" ; then
- sed "s;<failOnWarning>.*true.*;<failOnWarning>false</failOnWarning>;g" -i $x;
- fi
-done
-
+%pom_disable_module test-jpms
+%pom_disable_module test-graal-native-image
+%pom_disable_module test-shrinker
%build
%mvn_build -f
@@ -92,7 +86,7 @@ done
%license LICENSE
%doc README.md CHANGELOG.md UserGuide.md
-%files javadoc -f .mfiles-javadoc
+%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
diff --git a/sources b/sources
index 8abac9b..0de37cd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gson-parent-2.10.1.tar.gz) = 074f40f7f9aa48daf5b5a3ec371713db02f6f8fceb959b01e8a16732862645d2350f3276ab7ff8021d48082f890b53c6e80d992af6af4b74e4646f85494b8e70
+SHA512 (gson-parent-2.12.1.tar.gz) = ac0eee1a1f1e3902b90bd1fd0c7b1f5b23802d5701f8d3b91719837cc13cbe356daf0c078012b99958ee2a14da437d6e367454b26db3c4436141661c8b11c67f
reply other threads:[~2026-08-17 12:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178697035143.1.14744408519502098774.rpms-google-gson-bf30d30b657b@fedoraproject.org \
--to=mizdebsk@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox