Skip to content

Commit 0855a7e

Browse files
committed
Move subproject-specific configuration to subprojects
1 parent a7b02df commit 0855a7e

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ eclipse {
5353
entries.removeIf { it is ProjectDependency && it.path.equals("/code-generator-model") }
5454
entries.filterIsInstance<SourceFolder>().forEach {
5555
it.excludes.add("**/module-info.java")
56-
if (project.name == "platform-tests" && it.path == "src/test/resources") {
57-
// Exclude Foo.java and FooBar.java in the modules-2500 folder.
58-
it.excludes.add("**/Foo*.java")
59-
}
60-
if (project.name == "jupiter-tests" && it.path == "src/test/java") {
61-
// Exclude test classes that depend on compiled Kotlin code.
62-
it.excludes.add("**/AtypicalJvmMethodNameTests.java")
63-
it.excludes.add("**/TestInstanceLifecycleKotlinTests.java")
64-
}
6556
}
6657
entries.filterIsInstance<ProjectDependency>().forEach {
6758
it.entryAttributes.remove("module")

jupiter-tests/jupiter-tests.gradle.kts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import org.gradle.api.tasks.PathSensitivity.RELATIVE
2+
import org.gradle.plugins.ide.eclipse.model.Classpath
3+
import org.gradle.plugins.ide.eclipse.model.SourceFolder
24

35
plugins {
46
id("junitbuild.code-generator")
@@ -41,3 +43,16 @@ tasks {
4143
}
4244
}
4345
}
46+
47+
eclipse {
48+
classpath.file.whenMerged {
49+
this as Classpath
50+
entries.filterIsInstance<SourceFolder>().forEach {
51+
if (it.path == "src/test/java") {
52+
// Exclude test classes that depend on compiled Kotlin code.
53+
it.excludes.add("**/AtypicalJvmMethodNameTests.java")
54+
it.excludes.add("**/TestInstanceLifecycleKotlinTests.java")
55+
}
56+
}
57+
}
58+
}

platform-tests/platform-tests.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import junitbuild.extensions.capitalized
22
import junitbuild.extensions.dependencyProject
33
import org.gradle.api.tasks.PathSensitivity.RELATIVE
44
import org.gradle.internal.os.OperatingSystem
5+
import org.gradle.plugins.ide.eclipse.model.Classpath
6+
import org.gradle.plugins.ide.eclipse.model.SourceFolder
57

68
plugins {
79
id("junitbuild.java-library-conventions")
@@ -143,6 +145,15 @@ eclipse {
143145
classpath {
144146
plusConfigurations.add(dependencyProject(projects.junitPlatformConsole).configurations["shadowedClasspath"])
145147
}
148+
classpath.file.whenMerged {
149+
this as Classpath
150+
entries.filterIsInstance<SourceFolder>().forEach {
151+
if (it.path == "src/test/resources") {
152+
// Exclude Foo.java and FooBar.java in the modules-2500 folder.
153+
it.excludes.add("**/Foo*.java")
154+
}
155+
}
156+
}
146157
}
147158

148159
idea {

0 commit comments

Comments
 (0)