From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6B9E115FA50 for ; Fri, 03 Oct 2025 05:07:39 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 574EA343185 for ; Fri, 03 Oct 2025 05:07:39 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id E67CD113140; Fri, 03 Oct 2025 05:07:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id D5EE411313D for ; Fri, 03 Oct 2025 05:07:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8766834317C for ; Fri, 03 Oct 2025 05:07:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D8443AA0 for ; Fri, 03 Oct 2025 05:07:18 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1759467977.25990f675ca55e3e81ad41c9d4b2608a41134a7c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/gson/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/gson/Manifest dev-java/gson/gson-2.13.2.ebuild X-VCS-Directories: dev-java/gson/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 25990f675ca55e3e81ad41c9d4b2608a41134a7c X-VCS-Branch: master Date: Fri, 03 Oct 2025 05:07:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 26bff814-5b02-46f0-abcd-1631832c3b17 X-Archives-Hash: cfa68f5a57c437ab9aaf3c4b798fb22b commit: 25990f675ca55e3e81ad41c9d4b2608a41134a7c Author: Volkmar W. Pogatzki pogatzki net> AuthorDate: Thu Apr 24 06:42:40 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri Oct 3 05:06:17 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25990f67 dev-java/gson: add 2.13.2 uses dev-java/truth instead of precompiled jar Signed-off-by: Volkmar W. Pogatzki pogatzki.net> Part-of: https://github.com/gentoo/gentoo/pull/43470 Signed-off-by: Sam James gentoo.org> dev-java/gson/Manifest | 1 + dev-java/gson/gson-2.13.2.ebuild | 74 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/dev-java/gson/Manifest b/dev-java/gson/Manifest index e21ed0c2effb..31ace9b67fe4 100644 --- a/dev-java/gson/Manifest +++ b/dev-java/gson/Manifest @@ -1,2 +1,3 @@ DIST gson-parent-2.11.0.tar.gz 458360 BLAKE2B 88d242c725b054ac5e7e3ef31f312f77dd03aea29f6604770253564d80f84cd752b43d74dd416785836d08884e462275f8ec924a00e2ffee195c0237bc2bac0b SHA512 1834b7c95f0a40ff1bcf8088f3ffdb8332ae38d452bab4ad2c9271421e75a9236645d1ee0fdb58c2f32eac86cf503afa3de19f08eb422cc91c4d32e370c36eac +DIST gson-parent-2.13.2.tar.gz 467484 BLAKE2B 46f60960c35aa268eaa4d1f0264f824f32f44d780a353bf4b2208a5fb7351c88a4d04248ca215dfd11ace6ea8ed8c4080e7342e818ddf1d30aace9d004b92043 SHA512 042eec392b52d040579fa23f48edc08f469d970e04904422e8173893f5c700a4ec3df34fec4feecc9da7197d4784392a37cfc8dbde355dcbbca22fe4e7bc1c11 DIST truth-1.1.3.jar 243021 BLAKE2B a59149038c62ef5dd352b13d4b393e1b7715fbafe5ed86ec2d16d722c738a31dcdca10132fc73b17b367ac4309e5407ba2e489f8d4c8fbca60ce5f35ae75d1e3 SHA512 f29a9fb070aff8a32358a7b6c8998c0095de5d8d68afa7f7bac759c7050309deff929e767657ecbbefd96163460f10255ca01bc567ab30df4834b9d916a4fae8 diff --git a/dev-java/gson/gson-2.13.2.ebuild b/dev-java/gson/gson-2.13.2.ebuild new file mode 100644 index 000000000000..d0c6e3472c1c --- /dev/null +++ b/dev-java/gson/gson-2.13.2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Gson JSON library" +HOMEPAGE="https://github.com/google/gson" +SRC_URI="https://github.com/google/gson/archive/gson-parent-${PV}.tar.gz" +S="${WORKDIR}/gson-gson-parent-${PV}/gson" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + >=dev-java/error-prone-annotations-2.41.0:0 + >=virtual/jdk-11:* + test? ( + >=dev-java/guava-33.4.8:0 + >=dev-java/guava-testlib-33.4.8:0 + dev-java/truth:0 + ) +" + +RDEPEND=">=virtual/jre-1.8:*" + +DOCS=( + ../CHANGELOG.md + ../GsonDesignDocument.md + ../README.md + ../Troubleshooting.md + ../UserGuide.md +) + +JAVA_CLASSPATH_EXTRA="error-prone-annotations" +JAVA_INTERMEDIATE_JAR_NAME="com.google.gson" +JAVA_RELEASE_SRC_DIRS=( ["9"]="src/main/java9" ) +JAVA_RESOURCE_DIRS="src/main/resources" +JAVA_SRC_DIR=( src/main/java{,-templates} ) + +# requires the test class to be obfuscated using proguard which we do not have atm +JAVA_TEST_EXCLUDES=( "com.google.gson.functional.EnumWithObfuscatedTest" ) + +JAVA_TEST_GENTOO_CLASSPATH="guava guava-testlib junit-4 truth" +JAVA_TEST_RESOURCE_DIRS="src/test/resources" +JAVA_TEST_SRC_DIR="src/test/java" + +src_prepare() { + java-pkg-2_src_prepare + + sed -e "s/\${project.version}/${PV}/g" \ + -i src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java \ + || die "Failed to set version" + + # Upstream builds it as META-INF/versions/9/module-info.class + mkdir -p src/main/java9 || die "mkdir java9" + mv src/main/java{,9}/module-info.java || die "move module-info.java" +} + +src_test() { + # src/test/java/com/google/gson/functional/Java17RecordTest.java:78: + # error: records are not supported in -source 11 + local vm_version="$(java-config -g PROVIDES_VERSION)" + if ver_test "${vm_version}" -ge 17 ; then + JAVAC_ARGS="--source 17 --target 17" java-pkg-simple_src_test + else + einfo "Tests need at least Java 17" + fi +}