Skip to content

Commit

Permalink
Declare Spock 2 test runtime dependencies in separate subproject
Browse files Browse the repository at this point in the history
  • Loading branch information
donat committed Jul 25, 2023
1 parent 2e145e1 commit 3d83aa2
Show file tree
Hide file tree
Showing 14 changed files with 260 additions and 8 deletions.
8 changes: 0 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,6 @@ subprojects {

// use common bundled testing depenendencies for all test plugins
plugins.withType(eclipsebuild.TestBundlePlugin) {
dependencies {
implementation "org.codehaus.groovy:groovy-all:$groovyLibVersion"
bundled "org.codehaus.groovy:groovy-all:$groovyLibVersion"
bundled "org.objenesis:objenesis:$objenesisLibVersion"
bundled "org.spockframework:spock-core:$spockLibVersion"
bundled "cglib:cglib-nodep:$cglibLibVersion"
bundled "org.slf4j:slf4j-simple:$slf4jLibVersion"
}
if (project.hasProperty('eclipse.test.java.version')) {
tasks.withType(EclipseTestTask) {
javaLauncher = javaToolchains.launcherFor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@ private void runPDETestsInEclipse(final TestExecutionSpec testSpec, final TestRe
programArgs.add("-port");
programArgs.add(Integer.toString(pdeTestPort));
programArgs.add("-testLoaderClass");
// TODO (donat) make test loader configurable
// programArgs.add("org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader");
programArgs.add("org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader");
programArgs.add("-loaderpluginname");
// TODO (donat) make runtime configurable
// programArgs.add("org.eclipse.jdt.junit5.runtime");
programArgs.add("org.eclipse.jdt.junit4.runtime");
programArgs.add("-classNames");

Expand Down
6 changes: 6 additions & 0 deletions org.eclipse.buildship.core.test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ apply plugin: eclipsebuild.TestBundlePlugin
apply plugin: 'groovy'

dependencies {
implementation "org.codehaus.groovy:groovy-all:$groovyLibVersion"
bundled "org.codehaus.groovy:groovy-all:$groovyLibVersion"
bundled "org.objenesis:objenesis:$objenesisLibVersion"
bundled "org.spockframework:spock-core:$spockLibVersion"
bundled "cglib:cglib-nodep:$cglibLibVersion"
bundled "org.slf4j:slf4j-simple:$slf4jLibVersion"
bundled 'org.spockframework:spock-core:1.3-groovy-2.5'
implementation project(':org.eclipse.buildship.compat')
api project(':org.eclipse.buildship.core')
Expand Down
6 changes: 6 additions & 0 deletions org.eclipse.buildship.oomph.test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ apply plugin: eclipsebuild.TestBundlePlugin
apply plugin: 'groovy'

dependencies {
implementation "org.codehaus.groovy:groovy-all:$groovyLibVersion"
bundled "org.codehaus.groovy:groovy-all:$groovyLibVersion"
bundled "org.objenesis:objenesis:$objenesisLibVersion"
bundled "org.spockframework:spock-core:$spockLibVersion"
bundled "cglib:cglib-nodep:$cglibLibVersion"
bundled "org.slf4j:slf4j-simple:$slf4jLibVersion"
bundled 'org.spockframework:spock-core:1.3-groovy-2.5'
implementation project(':org.eclipse.buildship.compat')
implementation project(':org.eclipse.buildship.core')
Expand Down
13 changes: 13 additions & 0 deletions org.eclipse.buildship.testfixtures/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
<classpathentry exported="true" kind="lib" path="lib/groovy-4.0.5.jar" sourcepath="lib/groovy-4.0.5-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hamcrest-2.2.jar" sourcepath="lib/hamcrest-2.2-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/spock-core-2.3-groovy-4.0.jar" sourcepath="lib/spock-core-2.3-groovy-4.0-sources.jar"/>
</classpath>
30 changes: 30 additions & 0 deletions org.eclipse.buildship.testfixtures/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.buildship.testfixtures</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
</filteredResources>
</projectDescription>
178 changes: 178 additions & 0 deletions org.eclipse.buildship.testfixtures/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - Test fixtures
Bundle-SymbolicName: org.eclipse.buildship.testfixtures;singleton:=true
Bundle-Version: 3.1.7.qualifier
Bundle-Vendor: Eclipse Buildship
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .,
lib/groovy-4.0.5.jar,
lib/hamcrest-2.2.jar,
lib/spock-core-2.3-groovy-4.0.jar
Require-Bundle: org.junit.jupiter.api;visibility:=reexport,
org.junit.platform.engine,
org.opentest4j,
org.junit.platform.commons
Export-Package: groovy.beans,
groovy.cli,
groovy.cli.internal,
groovy.grape,
groovy.inspect,
groovy.io,
groovy.lang,
groovy.lang.groovydoc,
groovy.namespace,
groovy.security,
groovy.time,
groovy.transform,
groovy.transform.builder,
groovy.transform.options,
groovy.transform.stc,
groovy.ui,
groovy.util,
groovy.util.logging,
groovyjarjarantlr4.runtime,
groovyjarjarantlr4.runtime.debug,
groovyjarjarantlr4.runtime.misc,
groovyjarjarantlr4.runtime.tree,
groovyjarjarantlr4.v4,
groovyjarjarantlr4.v4.analysis,
groovyjarjarantlr4.v4.automata,
groovyjarjarantlr4.v4.codegen,
groovyjarjarantlr4.v4.codegen.model,
groovyjarjarantlr4.v4.codegen.model.chunk,
groovyjarjarantlr4.v4.codegen.model.decl,
groovyjarjarantlr4.v4.codegen.target,
groovyjarjarantlr4.v4.gui,
groovyjarjarantlr4.v4.misc,
groovyjarjarantlr4.v4.parse,
groovyjarjarantlr4.v4.runtime,
groovyjarjarantlr4.v4.runtime.atn,
groovyjarjarantlr4.v4.runtime.dfa,
groovyjarjarantlr4.v4.runtime.misc,
groovyjarjarantlr4.v4.runtime.tree,
groovyjarjarantlr4.v4.runtime.tree.pattern,
groovyjarjarantlr4.v4.runtime.tree.xpath,
groovyjarjarantlr4.v4.semantics,
groovyjarjarantlr4.v4.tool,
groovyjarjarantlr4.v4.tool.ast,
groovyjarjarantlr4.v4.unicode,
groovyjarjarasm.asm,
groovyjarjarasm.asm.commons,
groovyjarjarasm.asm.signature,
groovyjarjarasm.asm.tree,
groovyjarjarasm.asm.util,
groovyjarjarpicocli,
org.apache.groovy.antlr,
org.apache.groovy.ast.tools,
org.apache.groovy.internal.metaclass,
org.apache.groovy.internal.util,
org.apache.groovy.io,
org.apache.groovy.lang,
org.apache.groovy.lang.annotation,
org.apache.groovy.metaclass,
org.apache.groovy.parser.antlr4,
org.apache.groovy.parser.antlr4.internal,
org.apache.groovy.parser.antlr4.internal.atnmanager,
org.apache.groovy.parser.antlr4.util,
org.apache.groovy.plugin,
org.apache.groovy.runtime,
org.apache.groovy.util,
org.apache.groovy.util.concurrent,
org.apache.groovy.util.concurrent.concurrentlinkedhashmap,
org.codehaus.groovy,
org.codehaus.groovy.antlr,
org.codehaus.groovy.ast,
org.codehaus.groovy.ast.builder,
org.codehaus.groovy.ast.decompiled,
org.codehaus.groovy.ast.expr,
org.codehaus.groovy.ast.stmt,
org.codehaus.groovy.ast.tools,
org.codehaus.groovy.classgen,
org.codehaus.groovy.classgen.asm,
org.codehaus.groovy.classgen.asm.indy,
org.codehaus.groovy.classgen.asm.indy.sc,
org.codehaus.groovy.classgen.asm.sc,
org.codehaus.groovy.classgen.asm.util,
org.codehaus.groovy.control,
org.codehaus.groovy.control.customizers,
org.codehaus.groovy.control.customizers.builder,
org.codehaus.groovy.control.io,
org.codehaus.groovy.control.messages,
org.codehaus.groovy.reflection,
org.codehaus.groovy.reflection.android,
org.codehaus.groovy.reflection.stdclasses,
org.codehaus.groovy.reflection.v7,
org.codehaus.groovy.runtime,
org.codehaus.groovy.runtime.callsite,
org.codehaus.groovy.runtime.dgmimpl,
org.codehaus.groovy.runtime.dgmimpl.arrays,
org.codehaus.groovy.runtime.m12n,
org.codehaus.groovy.runtime.memoize,
org.codehaus.groovy.runtime.metaclass,
org.codehaus.groovy.runtime.powerassert,
org.codehaus.groovy.runtime.typehandling,
org.codehaus.groovy.runtime.wrappers,
org.codehaus.groovy.syntax,
org.codehaus.groovy.tools,
org.codehaus.groovy.tools.ast,
org.codehaus.groovy.tools.gse,
org.codehaus.groovy.tools.javac,
org.codehaus.groovy.tools.shell,
org.codehaus.groovy.tools.shell.util,
org.codehaus.groovy.transform,
org.codehaus.groovy.transform.sc,
org.codehaus.groovy.transform.sc.transformers,
org.codehaus.groovy.transform.stc,
org.codehaus.groovy.transform.tailrec,
org.codehaus.groovy.transform.trait,
org.codehaus.groovy.util,
org.codehaus.groovy.vmplugin,
org.codehaus.groovy.vmplugin.v10,
org.codehaus.groovy.vmplugin.v16,
org.codehaus.groovy.vmplugin.v7,
org.codehaus.groovy.vmplugin.v8,
org.codehaus.groovy.vmplugin.v9,
org.hamcrest,
org.hamcrest.beans,
org.hamcrest.collection,
org.hamcrest.comparator,
org.hamcrest.core,
org.hamcrest.internal,
org.hamcrest.io,
org.hamcrest.number,
org.hamcrest.object,
org.hamcrest.text,
org.hamcrest.xml,
org.spockframework.builder,
org.spockframework.buildsupport,
org.spockframework.compat.groovy2,
org.spockframework.compiler,
org.spockframework.compiler.model,
org.spockframework.gentyref,
org.spockframework.lang,
org.spockframework.mock,
org.spockframework.mock.codegen,
org.spockframework.mock.constraint,
org.spockframework.mock.response,
org.spockframework.mock.runtime,
org.spockframework.report.log,
org.spockframework.runtime,
org.spockframework.runtime.condition,
org.spockframework.runtime.extension,
org.spockframework.runtime.extension.builtin,
org.spockframework.runtime.model,
org.spockframework.runtime.model.parallel,
org.spockframework.tempdir,
org.spockframework.util,
org.spockframework.util.inspector,
spock.config,
spock.lang,
spock.mock,
spock.util,
spock.util.concurrent,
spock.util.environment,
spock.util.io,
spock.util.matcher,
spock.util.mop,
spock.util.time
11 changes: 11 additions & 0 deletions org.eclipse.buildship.testfixtures/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apply plugin: eclipsebuild.BundlePlugin

dependencies {
bundled platform('org.apache.groovy:groovy-bom:4.0.5')
bundled 'org.apache.groovy:groovy'
bundled platform("org.spockframework:spock-bom:2.3-groovy-4.0")
bundled("org.spockframework:spock-core") {
exclude group: 'org.junit'
exclude group: 'org.junit.platform'
}
}
5 changes: 5 additions & 0 deletions org.eclipse.buildship.testfixtures/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/main/java/
output.. = bin/
bin.includes = .,\
lib/,\
META-INF/,\
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions org.eclipse.buildship.ui.test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ apply plugin: eclipsebuild.TestBundlePlugin
apply plugin: 'groovy'

dependencies {
implementation "org.codehaus.groovy:groovy-all:$groovyLibVersion"
bundled "org.codehaus.groovy:groovy-all:$groovyLibVersion"
bundled "org.objenesis:objenesis:$objenesisLibVersion"
bundled "org.spockframework:spock-core:$spockLibVersion"
bundled "cglib:cglib-nodep:$cglibLibVersion"
bundled "org.slf4j:slf4j-simple:$slf4jLibVersion"
bundled 'org.spockframework:spock-core:1.3-groovy-2.5'
implementation project(':org.eclipse.buildship.compat')
implementation project(':org.eclipse.buildship.core')
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ include ':org.eclipse.buildship.oomph'
include ':org.eclipse.buildship.oomph.edit'
include ':org.eclipse.buildship.oomph.feature'
include ':org.eclipse.buildship.oomph.test'
include ':org.eclipse.buildship.testfixtures'

// Use local build cache on developer machine and remote cache on CI
String cacheUrl = System.getProperty('gradle.cache.remote.url', '')
Expand Down

0 comments on commit 3d83aa2

Please sign in to comment.