-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Part II - Add module org.junit.platform.commons.jpms #1057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Edit: that project was superseded by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general!
build.gradle
Outdated
def signArtifacts = !project.version.contains('SNAPSHOT') | ||
def isSnapshot = project.version.contains('SNAPSHOT') | ||
def isContinuousIntegrationEnvironment = Boolean.parseBoolean(System.getenv("JITPACK")) | ||
def signArtifacts = !(isSnapshot || isContinuousIntegrationEnvironment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you want to sign the artifacts for Jitpack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fails on JitPack as there are no credentials available over there.
The purpose, namely depending on a branch SNAPSHOT build, is served well w/o signing and usually, one could use our official master SNAPSHOT distro anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, makes sense, sorry I misremembered our conversation about signing.
/** | ||
* Class finder service providing interface. | ||
*/ | ||
public interface ClassFinder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a top-level class, e.g. ModuleClassFinder
, would make it easier to use because it wouldn't require a $
in the file name of implementors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh, thought about that too.
But a) it's an internal SPI and b) you don't specify the $
when using it in a module descriptor:
module org.junit.platform.commons.jpms {
requires org.junit.platform.commons;
provides org.junit.platform.commons.util.ModuleUtils.ClassFinder with
org.junit.platform.commons.jpms.ModuleClassFinder;
}
List<Class<?>> classes = new ArrayList<>(); | ||
for (ClassFinder classFinder : ServiceLoader.load(ClassFinder.class, classLoader)) { | ||
classes.addAll(classFinder.findAllClassesInModule(moduleName, classTester, classNameFilter)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we throw an exception or at least log something when no ClassFinder
is registered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally yes. Should have added the TODO
marker here that exists in mind...
Current command line reads:
|
6a4ad56
to
a4d9e48
Compare
Moved to a 100% Gradle build setup -- with a bunch of manual tasks to show-case "same module" and "integration" testing. |
See also: https://jitpack.io/com/github/junit-team/junit5/jpms-r5.0.0-g2b9b12d-11/build.log |
b94eb48
to
2703730
Compare
This commit contains the default ModuleClassFinder implementation that scans Java 9 modules for testable classes. Therefore you need JDK 9 to build this sub-project. Addresses #425
Superseded by #1087 |
Overview
This PR introduces
org.junit.platform.commons.jpms
as the defaultModuleClassFinder
implementation. See #1061 for details.include
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations