summaryrefslogtreecommitdiff
path: root/dev-java/gson
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/gson')
-rw-r--r--dev-java/gson/Manifest1
-rw-r--r--dev-java/gson/gson-2.9.0-r2.ebuild60
2 files changed, 61 insertions, 0 deletions
diff --git a/dev-java/gson/Manifest b/dev-java/gson/Manifest
index 9288b91dfa79..c2ab2c5713e4 100644
--- a/dev-java/gson/Manifest
+++ b/dev-java/gson/Manifest
@@ -2,4 +2,5 @@ DIST gson-2.8.8-sources.tar.gz 393941 BLAKE2B ebdd1088a069eea58e5ea4e2eddea0d420
DIST gson-2.9.0.tar.gz 350309 BLAKE2B f17f7a7410744b14cb79c979b35c7f3c46a3d9e922722c41893b872013319a1bd06d81526e8380055aafa47524bfcc50e02629d1c5994e1f9f81df4391a9c651 SHA512 25e57f0e3cbff7e4d33070d250ba4ecf1c659380bce07863c52a3b30edd0ba88c923e55b0f38098b5ce3827a74a21c4d41f9de02f6a84da771ae39fd823667d3
EBUILD gson-2.8.8-r1.ebuild 1745 BLAKE2B 6df1694112b6a71a33b7e96cb84d227cd96a69e6f55c3a964e3f4cbb585e96f9f457900e47260fb8204e7bdaf5e771f4dd9833090e9f22a63388e224e9fb4d7f SHA512 af2f7b14c43f914a91ab4285c1f702388fc45d9d78bcf9fdb65b918436bc4cfda135269168255df20813c24cfa32c38ec4eabf5a49fc6e22b2c6cd6e5bc3c063
EBUILD gson-2.9.0-r1.ebuild 2095 BLAKE2B 71415fd6ec715372eddec83dd7ee27e84ba2bbf06d9e0cd206d3ebbccbcd8c90ea310befb4730da41a495609903049aef94bbd0d24125a6c0cc3e7f37b31f34a SHA512 217c6663d07526a44e9c23ffee344c3fd87653da8c14b359f7bb927eb78e564071c7678e55bf28c6b6baf4f019c2046365fffa1041d022c67af1814b71b98436
+EBUILD gson-2.9.0-r2.ebuild 2060 BLAKE2B beda8028f1e6779345dac9e6ba2a7bb80f7ce188425f29f45c9caf673e6e7170c65dbc15691b5fa8433fb582b40d075b6c9711f7f94a2ffa6cd8bc47bb123123 SHA512 a5e874d6a35b5c5006128f94573087972b292229335a4944b0c12fade665fd9dd50b52ddf94a354acd5df4604fd34edb977db1501db699306c972b848e0adf5c
MISC metadata.xml 630 BLAKE2B e4732be361d93273cb3c6084e4fa596def785aa6b0cd747f3cc65b9d9b693666e60188c6b30c0e7a234cca56239b9d22c14eaf21af7958f818de3a6b4b246729 SHA512 063d42b12383dde777dfdea7fb884423bdf3e377aa585b4b46d6d2581e81cd943e0a444792997c87d3443fa4516d211d9c3f78e5702b7376cda63718f14f6504
diff --git a/dev-java/gson/gson-2.9.0-r2.ebuild b/dev-java/gson/gson-2.9.0-r2.ebuild
new file mode 100644
index 000000000000..c5ddf82b4f07
--- /dev/null
+++ b/dev-java/gson/gson-2.9.0-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Skeleton command:
+# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/google/gson/archive/gson-parent-2.9.0.tar.gz --slot 2.6 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild gson-2.9.0.ebuild
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="com.google.code.gson:gson:2.9.0"
+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/${PN}/archive/${PN}-parent-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="2.6"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+DEPEND=">=virtual/jdk-11:*"
+RDEPEND=">=virtual/jre-1.8:*"
+
+S="${WORKDIR}/${PN}-${PN}-parent-${PV}/${PN}"
+
+JAVA_SRC_DIR=(
+ "src/main/java"
+ "src/main/java-templates"
+)
+
+JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+JAVA_TEST_SRC_DIR="src/test/java"
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+
+JAVA_TEST_EXCLUDES=(
+ # requires the test class to be obfuscated using proguard which we do not have atm
+ "com.google.gson.functional.EnumWithObfuscatedTest"
+ # FAILURES!!!
+ # Tests run: 1090, Failures: 3
+ # testComGoogleGsonAnnotationsPackage(com.google.gson.regression.OSGiTest)
+ # junit.framework.AssertionFailedError: Cannot find com.google.gson OSGi bundle manifest
+ "com.google.gson.regression.OSGiTest"
+ # testSerializeInternalImplementationObject(com.google.gson.functional.ReflectionAccessTest)
+ # java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
+ "com.google.gson.functional.ReflectionAccessTest"
+)
+
+src_prepare() {
+ default
+ sed -e "s/\${project.version}/${PV}/g" \
+ -i src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java \
+ || die "Failed to set version"
+
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+ if ver_test "${vm_version}" -ge "17" ; then
+ JAVA_TEST_EXCLUDES+=( "com.google.gson.internal.bind.DefaultDateTypeAdapterTest" )
+ fi
+}