Skip to content

Commit c562845

Browse files
committed
Merge branch 'master' into fit-gradle9
2 parents 2f2beab + 68d6701 commit c562845

5 files changed

Lines changed: 34 additions & 4 deletions

File tree

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "com.gradle.enterprise" version "3.16.2"
2+
id "com.gradle.enterprise" version "3.17.4"
33
}
44

55
rootProject.name = 'moduleplugin'

src/main/java/org/javamodularity/moduleplugin/extensions/CompileTestModuleOptions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@
33
import org.gradle.api.Project;
44

55
public class CompileTestModuleOptions extends ModuleOptions {
6+
67
private boolean compileOnClasspath;
78

89
public CompileTestModuleOptions(Project project) {
910
super(project);
1011
}
1112

13+
@Deprecated(since = "1.8.16", forRemoval = true)
1214
public boolean isCompileOnClasspath() {
1315
return compileOnClasspath;
1416
}
1517

18+
public boolean getCompileOnClasspath() {
19+
return compileOnClasspath;
20+
}
21+
1622
public void setCompileOnClasspath(boolean compileOnClasspath) {
1723
this.compileOnClasspath = compileOnClasspath;
1824
}

src/main/java/org/javamodularity/moduleplugin/tasks/CompileTestTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ private void configureCompileTestJava(JavaCompile compileTestJava) {
4242
var moduleOptions = compileTestJava.getExtensions()
4343
.create("moduleOptions", CompileTestModuleOptions.class, project);
4444
project.afterEvaluate(p -> {
45-
LOGGER.info(compileTestJava.getName() + ".compileOnClasspath: {}", moduleOptions.isCompileOnClasspath());
46-
if(!moduleOptions.isCompileOnClasspath()) {
45+
LOGGER.info(compileTestJava.getName() + ".compileOnClasspath: {}", moduleOptions.getCompileOnClasspath());
46+
if(!moduleOptions.getCompileOnClasspath()) {
4747
// don't convert to lambda: https://github.com/java9-modularity/gradle-modules-plugin/issues/54
4848
compileTestJava.doFirst(new Action<>() {
4949
@Override

test-project-groovy/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,17 @@ subprojects {
3737
exclude module: 'groovy-xml'
3838
}
3939
}
40+
41+
test {
42+
moduleOptions {
43+
runOnClasspath = false
44+
}
45+
}
46+
47+
compileTestJava {
48+
moduleOptions {
49+
compileOnClasspath = false
50+
}
51+
}
52+
4053
}

test-project-kotlin/build.gradle.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
kotlin("jvm") version "1.9.22" apply false
4+
kotlin("jvm") version "2.0.0" apply false
55
id("org.javamodularity.moduleplugin") version "2.0.0" apply false
66
}
77

@@ -11,6 +11,7 @@ subprojects {
1111

1212
//region https://docs.gradle.org/current/userguide/kotlin_dsl.html#using_kotlin_delegated_properties
1313
val test by tasks.existing(Test::class)
14+
val compileTestJava by tasks.existing(JavaCompile::class)
1415

1516
val implementation by configurations
1617
val testImplementation by configurations
@@ -53,6 +54,16 @@ subprojects {
5354
testLogging {
5455
events("PASSED", "FAILED", "SKIPPED", "STANDARD_OUT")
5556
}
57+
58+
extensions.configure(org.javamodularity.moduleplugin.extensions.TestModuleOptions::class) {
59+
runOnClasspath = false
60+
}
61+
}
62+
63+
compileTestJava {
64+
extensions.configure(org.javamodularity.moduleplugin.extensions.CompileTestModuleOptions::class) {
65+
compileOnClasspath = false
66+
}
5667
}
5768

5869
dependencies {

0 commit comments

Comments
 (0)