Skip to content

Commit e0bb181

Browse files
committed
more mocking
1 parent a915ec5 commit e0bb181

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

‎build.gradle‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ plugins {
77
id("com.github.hierynomus.license") version "0.16.1"
88
id("biz.aQute.bnd.builder") version "7.3.0"
99
id("com.vanniktech.maven.publish") version "0.37.0"
10-
id("org.beryx.jar") version "2.0.0"
1110
id("signing")
1211
}
1312

@@ -38,21 +37,25 @@ repositories {
3837
}
3938

4039
dependencies {
41-
4240
implementation "io.reactivex.rxjava4:rxjava:$rxJavaVersion"
4341

4442
testImplementation "org.mockito:mockito-core:$mockitoVersion"
4543
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoJUnitVersion"
4644

4745
testImplementation "org.junit.jupiter:junit-jupiter:$jupiterVersion"
4846

49-
// Explicitly add these for IDE compatibility (especially Eclipse)
47+
// For Eclipse + JUnit Platform launcher (keep these)
5048
testImplementation "org.junit.platform:junit-platform-commons:$jupiterLauncherVersion"
5149
testImplementation "org.junit.platform:junit-platform-launcher:$jupiterLauncherVersion"
50+
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$jupiterLauncherVersion"
5251

53-
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$jupiterLauncherVersion" // already have this
52+
// === NEW: Make requires static work for module-info.java compilation ===
53+
// These go on compileClasspath (so module-info.java can resolve them) but are NOT packaged
54+
compileOnly "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
55+
compileOnly "org.junit.platform:junit-platform-commons:$jupiterLauncherVersion"
56+
// Optional: if you also want the mockito requires static
57+
// compileOnly "org.mockito:mockito-core:$mockitoVersion"
5458
}
55-
5659
// === Experimental JDK handling for Outreach Program ===
5760
def experimental = System.getenv("JDK_EXPERIMENTAL")
5861
def toolchainJdk = "26" // default / baseline
@@ -73,6 +76,7 @@ tasks.withType(JavaCompile) {
7376
options.compilerArgs << "-parameters"
7477
options.compilerArgs += '-Xlint:-module'
7578
options.compilerArgs += '-Xlint:unchecked'
79+
modularity.inferModulePath = true
7680
}
7781

7882
checkstyle {
@@ -127,12 +131,6 @@ javadoc {
127131
// modularity.inferModulePath = true // let Gradle handle deps on --module-path
128132
}
129133

130-
moduleConfig {
131-
moduleInfoPath = 'src/main/module/module-info.java'
132-
multiReleaseVersion = 9
133-
version = project.version
134-
}
135-
136134
import aQute.bnd.gradle.Bundle // ← important import
137135

138136
tasks.register('bundle', Bundle) {
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
requires java.management;
3333
requires transitive io.reactivex.rxjava4;
3434

35-
/*
3635
requires static org.junit.jupiter.api;
3736
requires static org.mockito;
3837
requires static org.junit.platform.commons;
39-
*/
4038
}

‎src/test/java/hu/akarnokd/rxjava4/basetypes/NonoTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ protected void subscribeActual(Subscriber<? super Void> s) {
22262226
throw new NullPointerException();
22272227
}
22282228
}.test();
2229-
})
2229+
});
22302230
}
22312231

22322232
@Test

0 commit comments

Comments
 (0)