Diff assertj-core-2.3.0-r1 with a assertj-core-3.10.0

/usr/portage/dev-java/assertj-core/assertj-core-3.10.0.ebuild 2023-10-09 14:52:29.412368348 +0300
1 1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
# Skeleton command:
5
# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/assertj/assertj-core/archive/assertj-core-3.10.0.tar.gz --slot 0 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild assertj-core-3.10.0.ebuild
6

  
4 7
EAPI=8
5 8

  
6
JAVA_PKG_IUSE="doc source"
7
MAVEN_ID="org.assertj:assertj-core:2.3.0"
9
JAVA_PKG_IUSE="doc source test"
10
MAVEN_ID="org.assertj:assertj-core:3.10.0"
11
JAVA_TESTING_FRAMEWORKS="junit-4"
8 12

  
9 13
inherit java-pkg-2 java-pkg-simple
10 14

  
11
DESCRIPTION="Java library that provides a fluent interface for writing assertions"
12
HOMEPAGE="https://joel-costigliola.github.io/assertj/"
13
SRC_URI="https://github.com/assertj/assertj-core/archive/assertj-core-${PV}.tar.gz"
15
DESCRIPTION="Rich and fluent assertions for testing for Java"
16
HOMEPAGE="https://assertj.github.io/doc/"
17
SRC_URI="https://github.com/assertj/${PN}/archive/${P}.tar.gz"
14 18

  
15 19
LICENSE="Apache-2.0"
20
SLOT="3"
16 21
KEYWORDS="amd64 ~arm arm64 ppc64 x86"
17
SLOT="2"
18 22

  
19
CDEPEND="dev-java/cglib:3
20
	dev-java/junit:4"
23
CP_DEPEND="
24
	>=dev-java/byte-buddy-1.12.12:0
25
"
26

  
27
DEPEND="
28
	>=virtual/jdk-1.8:*
29
	${CP_DEPEND}
30
	dev-java/hamcrest-core:1.3
31
	dev-java/junit:4
32
	dev-java/opentest4j:0
33
	test? (
34
		dev-java/guava:0
35
		dev-java/junit-dataprovider:0
36
		dev-java/memoryfilesystem:0
37
		dev-java/mockito:4
38
	)
39
"
40

  
41
RDEPEND="
42
	>=virtual/jre-1.8:*
43
	${CP_DEPEND}"
21 44

  
22
DEPEND="${CDEPEND}
23
	>=virtual/jdk-1.8:*"
45
DOCS=( {CODE_OF_CONDUCT,CONTRIBUTING,README}.md )
24 46

  
25
RDEPEND="${CDEPEND}
26
	>=virtual/jre-1.8:*"
47
PATCHES=( "${FILESDIR}"/assertj-core-3.10.0-java11-compatibility.patch )
27 48

  
28 49
S="${WORKDIR}/${PN}-${P}"
50

  
51
JAVA_CLASSPATH_EXTRA="junit-4,hamcrest-core-1.3,opentest4j"
29 52
JAVA_SRC_DIR="src/main/java"
30
JAVA_GENTOO_CLASSPATH="cglib-3,junit-4"
31 53

  
32
src_install() {
33
	java-pkg-simple_src_install
34
	dodoc {CONTRIBUTING,README}.md
54
JAVA_TEST_GENTOO_CLASSPATH="guava,junit-dataprovider,memoryfilesystem,mockito-4"
55
JAVA_TEST_SRC_DIR="src/test/java"
56
JAVA_TEST_RESOURCE_DIRS="src/test/resources"
57

  
58
# These test classes are not run by "mvn test"
59
# FAILURES!!!
60
# Tests run: 11514,  Failures: 32
61
# Exclusion should leave "OK (11486 tests)" with jdk-11
62
# and 14 test failures with jdk-17
63
JAVA_TEST_EXCLUDES=(
64
	org.assertj.core.internal.BaseArraysTest
65
	org.assertj.core.internal.TestDescription
66
	org.assertj.core.navigation.BaseNavigableIterableAssert_Test
67
	org.assertj.core.navigation.BaseNavigableListAssert_Test
68
	org.assertj.core.navigation.GenericNavigableAssert_Test
69
	org.assertj.core.api.assumptions.BaseAssumptionsRunnerTest
70
	org.assertj.core.api.atomic.referencearray.AtomicReferenceArrayAssert_filtered_baseTest
71
	org.assertj.core.api.iterable.IterableAssert_filtered_baseTest
72
	org.assertj.core.api.objectarray.ObjectArrayAssert_filtered_baseTest
73
	org.assertj.core.api.TestCondition
74
	org.assertj.core.api.BaseAssertionsTest
75
	org.assertj.core.util.Files_TestCase
76
	org.assertj.core.test.EqualsHashCodeContractTestCase
77
	org.assertj.core.test.TestClassWithRandomId
78
	org.assertj.core.test.TestData
79
	org.assertj.core.test.TestFailures
80
)
81

  
82
src_prepare() {
83
	default
84
	sed \
85
		-e 's:verifyZeroInteractions:verifyNoInteractions:' \
86
		-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_DoubleStream_Test.java \
87
		-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_IntStream_Test.java \
88
		-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_Iterator_Test.java \
89
		-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_LongStream_Test.java \
90
		-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_Stream_Test.java \
91
		-i src/test/java/org/assertj/core/matcher/AssertionMatcher_matches_Test.java || die
92
}
93

  
94
src_test() {
95
	local vm_version="$(java-config -g PROVIDES_VERSION)"
96
	if ver_test "${vm_version}" -ge 17; then
97
		JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.io=ALL-UNNAMED )
98
		JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.lang=ALL-UNNAMED )
99
		JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.math=ALL-UNNAMED )
100
		JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.util=ALL-UNNAMED )
101
		# Before further test_excluds it should now read "Tests run: 11486,  Failures: 3"
102
		# Additional exclusions will leave "OK (11476 tests)"
103
		JAVA_TEST_EXCLUDES+=(
104
			org.assertj.core.internal.classes.Classes_assertHasMethods_Test
105
			org.assertj.core.util.xml.XmlStringPrettyFormatter_prettyFormat_Test
106
		)
107
	fi
108
	java-pkg-simple_src_test
35 109
}
Thank you!