diff --git a/build.gradle b/build.gradle index 4bd499d60..48bb1a0e6 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { diff --git a/buildSrc/src/main/groovy/eclipsebuild/testing/EclipseTestExecuter.java b/buildSrc/src/main/groovy/eclipsebuild/testing/EclipseTestExecuter.java index 68228eb70..c7e0ae7da 100644 --- a/buildSrc/src/main/groovy/eclipsebuild/testing/EclipseTestExecuter.java +++ b/buildSrc/src/main/groovy/eclipsebuild/testing/EclipseTestExecuter.java @@ -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"); diff --git a/org.eclipse.buildship.core.test/build.gradle b/org.eclipse.buildship.core.test/build.gradle index 3777cbe8d..d3864c93e 100644 --- a/org.eclipse.buildship.core.test/build.gradle +++ b/org.eclipse.buildship.core.test/build.gradle @@ -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') diff --git a/org.eclipse.buildship.oomph.test/build.gradle b/org.eclipse.buildship.oomph.test/build.gradle index 006a906ad..35efe4029 100644 --- a/org.eclipse.buildship.oomph.test/build.gradle +++ b/org.eclipse.buildship.oomph.test/build.gradle @@ -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') diff --git a/org.eclipse.buildship.testfixtures/.classpath b/org.eclipse.buildship.testfixtures/.classpath new file mode 100644 index 000000000..eb73f4e21 --- /dev/null +++ b/org.eclipse.buildship.testfixtures/.classpath @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/org.eclipse.buildship.testfixtures/.project b/org.eclipse.buildship.testfixtures/.project new file mode 100644 index 000000000..4dc525b6a --- /dev/null +++ b/org.eclipse.buildship.testfixtures/.project @@ -0,0 +1,30 @@ + + + org.eclipse.buildship.testfixtures + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + + + diff --git a/org.eclipse.buildship.testfixtures/META-INF/MANIFEST.MF b/org.eclipse.buildship.testfixtures/META-INF/MANIFEST.MF new file mode 100644 index 000000000..17983887c --- /dev/null +++ b/org.eclipse.buildship.testfixtures/META-INF/MANIFEST.MF @@ -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 diff --git a/org.eclipse.buildship.testfixtures/build.gradle b/org.eclipse.buildship.testfixtures/build.gradle new file mode 100644 index 000000000..5b84b1a29 --- /dev/null +++ b/org.eclipse.buildship.testfixtures/build.gradle @@ -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' + } +} \ No newline at end of file diff --git a/org.eclipse.buildship.testfixtures/build.properties b/org.eclipse.buildship.testfixtures/build.properties new file mode 100644 index 000000000..5dc551ebd --- /dev/null +++ b/org.eclipse.buildship.testfixtures/build.properties @@ -0,0 +1,5 @@ +source.. = src/main/java/ +output.. = bin/ +bin.includes = .,\ + lib/,\ + META-INF/,\ diff --git a/org.eclipse.buildship.testfixtures/lib/groovy-4.0.5.jar b/org.eclipse.buildship.testfixtures/lib/groovy-4.0.5.jar new file mode 100644 index 000000000..b5e8b7074 Binary files /dev/null and b/org.eclipse.buildship.testfixtures/lib/groovy-4.0.5.jar differ diff --git a/org.eclipse.buildship.testfixtures/lib/hamcrest-2.2.jar b/org.eclipse.buildship.testfixtures/lib/hamcrest-2.2.jar new file mode 100644 index 000000000..71065788d Binary files /dev/null and b/org.eclipse.buildship.testfixtures/lib/hamcrest-2.2.jar differ diff --git a/org.eclipse.buildship.testfixtures/lib/spock-core-2.3-groovy-4.0.jar b/org.eclipse.buildship.testfixtures/lib/spock-core-2.3-groovy-4.0.jar new file mode 100644 index 000000000..1a6e7c65a Binary files /dev/null and b/org.eclipse.buildship.testfixtures/lib/spock-core-2.3-groovy-4.0.jar differ diff --git a/org.eclipse.buildship.ui.test/build.gradle b/org.eclipse.buildship.ui.test/build.gradle index 7958a7f3f..95ae187d4 100644 --- a/org.eclipse.buildship.ui.test/build.gradle +++ b/org.eclipse.buildship.ui.test/build.gradle @@ -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') diff --git a/settings.gradle b/settings.gradle index b6017b66c..afc1278e1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -32,6 +32,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', '')