public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/mockito/
Date: Fri, 03 Oct 2025 16:33:36 +0000 (UTC)	[thread overview]
Message-ID: <1759509066.308ecabc40a0f77e575615c564e78cad98678e15.sam@gentoo> (raw)

commit:     308ecabc40a0f77e575615c564e78cad98678e15
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Wed Sep 17 08:58:12 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct  3 16:31:06 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=308ecabc

dev-java/mockito: add 5.20.0 in SLOT="0"

Consumers of dev-java/mockito:4 should be switched to this newer version
when getting updated.

Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Part-of: https://github.com/gentoo/gentoo/pull/43824
Closes: https://github.com/gentoo/gentoo/pull/43824
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-java/mockito/Manifest              |  1 +
 dev-java/mockito/mockito-5.20.0.ebuild | 95 ++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)

diff --git a/dev-java/mockito/Manifest b/dev-java/mockito/Manifest
index 9d9fe63d1383..d2e824d6d275 100644
--- a/dev-java/mockito/Manifest
+++ b/dev-java/mockito/Manifest
@@ -1,3 +1,4 @@
 DIST mockito-2.28.2.tar.gz 875085 BLAKE2B d0aab378c028530724156f999700506fe64f5bf19371dc9b957e34924d3d17b8191f093054c6dde4f5879d61ddf9614a60b1fd597aae09b92abf559c08fbcdf7 SHA512 9921fe9ffbdff4d7a9a8de56aa5078e68eb6bee38f379f58059dcc42da07a59b7e5953309d646e1fb760f7135f5076e201529370cc5df56d685f7acb08311ea5
 DIST mockito-4.11.0.tar.gz 1050218 BLAKE2B 7f7298e233c9cdb0b475aa201300a1063fd8efc587f3a4de0cb1caedd6f6506a32f8e9b0548fa5898892515ec96625153a1a2ad65fc8070b7dc6c254206fbbfd SHA512 b1de01c8e9b2fc4eef0013af562efeac7e22babdebbd8c7842ecd55071627e11c5e6ab575436990ea70d4ceefb56fc260333278c8d4b833e454956bf89841fc5
+DIST mockito-5.20.0.tar.gz 897211 BLAKE2B 605a8b9953509e8ffc5f6e1c89f3174256d0b563faa43d497e82fe780d2a47f13d89d6b0f410acabbb1e7b13395690cbad87a3c767fe807ae7dfbe52c97e1d38 SHA512 3c929e1469421335a13d6651bc39f6dd10c99d761d89c9c5daa6da44a8fb6732f23b99c27017dd8cccd90e6dd159187fda34f4d61893f620d6fd54ac13377441
 DIST mockito-core-1.9.5-sources.jar 723074 BLAKE2B e553a923542a1a2574ee0cda5979d168cc3e9644dbbc9fceed2301ae1bac150c4e35dbc4432d50e2479efea2a6cd35ec19c62c3598f61709f1f5dc8959cc0155 SHA512 271e626c3b5be9a7d7c82a2f0bf44077aabd51924b0956a88633ace7fe8c134d8cd1f89ce348ce0d15ccce55a50027e303836d2d2f430500317b6136d308d3d4

diff --git a/dev-java/mockito/mockito-5.20.0.ebuild b/dev-java/mockito/mockito-5.20.0.ebuild
new file mode 100644
index 000000000000..d01db40fab88
--- /dev/null
+++ b/dev-java/mockito/mockito-5.20.0.ebuild
@@ -0,0 +1,95 @@
+# 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-jupiter"
+
+inherit java-pkg-2 java-pkg-simple junit5
+
+DESCRIPTION="Mockito mock objects library core API and implementation"
+HOMEPAGE="https://github.com/mockito/mockito"
+SRC_URI="https://github.com/mockito/mockito/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+	>=dev-java/asm-9.8-r1:0
+	>=dev-java/byte-buddy-1.17.7:0
+	>=dev-java/hamcrest-3.0:0
+	>=dev-java/jna-5.17.0:0
+	>=dev-java/jsr305-3.0.2-r1:0
+	>=dev-java/junit-4.13.2_p20240222:4
+	dev-java/junit:5
+	>=dev-java/objenesis-3.4:0
+	>=dev-java/opentest4j-1.3.0-r1:0
+	>=virtual/jdk-11:*
+	test? ( >=dev-java/assertj-core-3.27.6:0 )
+"
+
+# virtual/jre lower than 11 would cause a compilation error:
+# src/main/java/org/mockito/internal/stubbing/defaultanswers/ReturnsDeepStubs.java:57:
+# error: cannot find symbol
+#         final var emptyValue = ReturnsEmptyValues.returnCommonEmptyValueFor(rawType);
+#               ^
+#   symbol:   class var
+RDEPEND=">=virtual/jre-11:*"
+
+JAVA_CLASSPATH_EXTRA="asm byte-buddy hamcrest jna jsr305 junit-5 objenesis opentest4j"
+JAVA_TEST_SRC_DIR="mockito-core/src/test/java"
+
+src_prepare() {
+	java-pkg-2_src_prepare
+	# junit:4 --with-dependencies seems to pull another hamcrest into classpath.
+	JAVA_GENTOO_CLASSPATH_EXTRA=":$(java-pkg_getjars --build-only junit-4)"
+
+	# dev-java/byte-buddy is built from byte-buddy-dep without shaded stuff.
+	sed \
+		-e 's:net.bytebuddy.jar.asm:org.objectweb.asm:' \
+		-i mockito-core/src/main/java/org/mockito/internal/creation/bytebuddy/MockMethodAdvice.java \
+		-i mockito-core/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java || die
+}
+
+src_compile() {
+	JAVA_JAR_FILENAME="mockito-core.jar"
+	JAVA_SRC_DIR="mockito-core/src/main/java"
+	java-pkg-simple_src_compile
+	JAVA_GENTOO_CLASSPATH_EXTRA+=":mockito-core.jar"
+	# whatever '.raw' is good for, upstream does it and we follow (and re-create the jar).
+	mv target/classes/org/mockito/internal/creation/bytebuddy/inject/MockMethodDispatcher.class \
+		target/classes/org/mockito/internal/creation/bytebuddy/inject-MockMethodDispatcher.raw || die
+	rm mockito-core.jar || die "remove core.jar"
+	jar cf mockito-core.jar -C target/classes . || die "refresh core.jar"
+
+	rm -r target/classes || die "clean classes"
+	JAVA_JAR_FILENAME="mockito-junit-jupiter.jar"
+	JAVA_SRC_DIR="mockito-extensions/mockito-junit-jupiter/src/main/java"
+	java-pkg-simple_src_compile
+}
+
+src_test() {
+	# mockito-core/src/test/java/org/mockito/internal/creation/bytebuddy/InlineDelegateByteBuddyMockMakerTest.java:347: error: cannot access MockMethodDispatcher
+	#         throwable = MockMethodAdvice.removeRecursiveCalls(throwable, SampleInterface.class);
+	#                                     ^
+	#   class file for org.mockito.internal.creation.bytebuddy.inject.MockMethodDispatcher not found
+	rm -v mockito-core/src/test/java/org/mockito/internal/creation/bytebuddy/InlineDelegateByteBuddyMockMakerTest.java || die
+	rm -v mockito-core/src/test/java/org/mockito/internal/creation/bytebuddy/sample/DifferentPackage.java || die
+
+	# assertj-core --with-dependencies seems to pull another hamcrest into classpath.
+	JAVA_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only assertj-core)"
+	rm -r target/classes || die "clean classes"
+	JAVA_JAR_FILENAME="testFixtures.jar"
+	JAVA_SRC_DIR="mockito-core/src/testFixtures/java"
+	java-pkg-simple_src_compile
+	JAVA_GENTOO_CLASSPATH_EXTRA+=":testFixtures.jar"
+	junit5_src_test
+}
+
+src_install() {
+	java-pkg-simple_src_install
+	java-pkg_dojar mockito-core.jar
+}


             reply	other threads:[~2025-10-03 16:33 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 16:33 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-10-18 15:53 [gentoo-commits] repo/gentoo:master commit in: dev-java/mockito/ Miroslav Šulc
2025-01-10  8:51 Miroslav Šulc
2025-01-10  7:43 Arthur Zamarin
2024-12-20 15:43 Sam James
2024-12-08 11:46 Miroslav Šulc
2024-04-16  7:49 Miroslav Šulc
2023-05-09  5:52 Arthur Zamarin
2023-05-07 13:40 Jakov Smolić
2023-05-07 11:45 Sam James
2023-04-07  8:09 Miroslav Šulc
2023-02-10 20:53 Sam James
2023-02-09 18:09 Arthur Zamarin
2023-02-09 18:09 Arthur Zamarin
2023-02-09 18:07 Sam James
2023-02-09 18:07 Sam James
2023-01-10 12:35 Florian Schmaus
2022-11-22  7:15 Miroslav Šulc
2022-11-21 21:48 Sam James
2022-11-21 21:48 Sam James
2022-11-21 17:43 Arthur Zamarin
2022-11-21 17:43 Arthur Zamarin
2022-11-10  8:06 Miroslav Šulc
2022-11-10  0:40 Sam James
2022-11-10  0:28 Sam James
2022-11-10  0:28 Sam James
2022-11-09 18:46 Arthur Zamarin
2022-10-22  6:50 Miroslav Šulc
2022-10-11  9:30 Miroslav Šulc
2022-10-10 10:05 Florian Schmaus
2022-10-09  7:33 Miroslav Šulc
2022-10-08 19:52 Sam James
2022-10-08 19:35 Arthur Zamarin
2022-10-08 12:26 Sam James
2022-10-08 12:26 Sam James
2022-09-08  8:26 Florian Schmaus
2022-08-23  4:41 Miroslav Šulc
2022-08-22  0:00 Sam James
2022-08-22  0:00 Sam James
2022-08-21 15:46 Arthur Zamarin
2022-08-21 15:46 Arthur Zamarin
2022-07-22 17:36 Florian Schmaus
2022-07-22 17:36 Florian Schmaus
2022-07-22 17:36 Florian Schmaus
2022-07-22 17:36 Florian Schmaus
2022-07-07 16:20 Arthur Zamarin
2022-07-07 14:29 Arthur Zamarin
2022-07-05 17:54 Sam James
2022-07-03 12:22 Jakov Smolić
2022-07-03 12:11 Jakov Smolić
2022-06-20  7:41 Florian Schmaus
2022-06-17 12:45 Arthur Zamarin
2022-06-16 15:15 Sam James
2022-06-16 15:15 Sam James
2022-06-03  8:54 Florian Schmaus
2022-04-10 15:16 Florian Schmaus
2021-11-25  4:14 Sam James
2021-06-18  6:34 Miroslav Šulc
2021-06-18  6:28 Agostino Sarubbo
2021-06-17  0:17 Sam James
2021-06-17  0:17 Sam James
2021-06-16  8:17 Miroslav Šulc
2021-06-11 10:04 Miroslav Šulc
2017-07-13 20:42 Alexis Ballier
2015-09-01 19:04 Tobias Klausmann

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=1759509066.308ecabc40a0f77e575615c564e78cad98678e15.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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