Skip to content

Commit 2776c6d

Browse files
authored
Add module-info.java to checker-qual (#6326)
1 parent 7743e5d commit 2776c6d

File tree

4 files changed

+78
-1
lines changed

4 files changed

+78
-1
lines changed

build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,9 @@ task allJavadoc(type: Javadoc, group: 'Documentation') {
568568
}
569569

570570
classpath = configurations.allProjects
571+
// disable interpreting module-info.java files until all sub-modules support them
572+
modularity.inferModulePath = false
573+
571574
doLast {
572575
copy {
573576
from 'docs/logo/Checkmark/CFCheckmark_favicon.png'
@@ -622,6 +625,8 @@ def createJavadocTask(taskName, taskDescription, memberLevel) {
622625
}
623626

624627
classpath = configurations.allProjects
628+
// disable interpreting module-info.java files until all sub-modules support them
629+
modularity.inferModulePath = false
625630

626631
destinationDir.deleteDir()
627632
options.memberLevel = memberLevel
@@ -809,7 +814,7 @@ subprojects {
809814
manifest {
810815
attributes('Implementation-Version': "${project.version}")
811816
attributes('Implementation-URL': 'https://checkerframework.org')
812-
if (! archiveFileName.get().endsWith('source.jar')) {
817+
if (! archiveFileName.get().endsWith('source.jar') && ! archiveFileName.get().startsWith('checker-qual')) {
813818
attributes('Automatic-Module-Name': 'org.checkerframework.' + project.name.replaceAll('-', '.'))
814819
}
815820
if (archiveFileName.get().startsWith('checker-qual') || archiveFileName.get().startsWith('checker-util')) {

checker-qual/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@ plugins {
33
id("biz.aQute.bnd.builder") version "6.4.0"
44
}
55

6+
sourceSets {
7+
main {
8+
java {
9+
exclude 'module-info.java'
10+
}
11+
}
12+
module_info {
13+
java {
14+
srcDirs ('src/main')
15+
}
16+
}
17+
}
18+
19+
task compileJava9(type: JavaCompile) {
20+
source = sourceSets.module_info.java
21+
destinationDirectory = sourceSets.main.output.classesDirs[0]
22+
classpath = configurations.allProjects
23+
options.release = 9
24+
}
25+
26+
compileJava {
27+
dependsOn compileJava9
28+
}
29+
30+
javadoc {
31+
modularity.inferModulePath = false
32+
}
633

734
jar {
835
manifest {
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* This module contains annotations (type qualifiers) that a programmer writes to specify Java code
3+
* for type-checking by the Checker Framework.
4+
*/
5+
module org.checkerframework.checker.qual {
6+
// javadoc-only dependencies
7+
requires static java.compiler;
8+
requires static java.desktop;
9+
requires static jdk.compiler;
10+
11+
// the .jar file (for the Automatic-Module-Name) is not ready during javadoc
12+
// requires static org.checkerframework.checker;
13+
14+
exports org.checkerframework.checker.builder.qual;
15+
exports org.checkerframework.checker.calledmethods.qual;
16+
exports org.checkerframework.checker.compilermsgs.qual;
17+
exports org.checkerframework.checker.fenum.qual;
18+
exports org.checkerframework.checker.formatter.qual;
19+
exports org.checkerframework.checker.guieffect.qual;
20+
exports org.checkerframework.checker.i18n.qual;
21+
exports org.checkerframework.checker.i18nformatter.qual;
22+
exports org.checkerframework.checker.index.qual;
23+
exports org.checkerframework.checker.initialization.qual;
24+
exports org.checkerframework.checker.interning.qual;
25+
exports org.checkerframework.checker.lock.qual;
26+
exports org.checkerframework.checker.mustcall.qual;
27+
exports org.checkerframework.checker.nullness.qual;
28+
exports org.checkerframework.checker.optional.qual;
29+
exports org.checkerframework.checker.propkey.qual;
30+
exports org.checkerframework.checker.regex.qual;
31+
exports org.checkerframework.checker.signature.qual;
32+
exports org.checkerframework.checker.signedness.qual;
33+
exports org.checkerframework.checker.tainting.qual;
34+
exports org.checkerframework.checker.units.qual;
35+
exports org.checkerframework.common.aliasing.qual;
36+
exports org.checkerframework.common.initializedfields.qual;
37+
exports org.checkerframework.common.reflection.qual;
38+
exports org.checkerframework.common.returnsreceiver.qual;
39+
exports org.checkerframework.common.subtyping.qual;
40+
exports org.checkerframework.common.util.count.report.qual;
41+
exports org.checkerframework.common.value.qual;
42+
exports org.checkerframework.dataflow.qual;
43+
exports org.checkerframework.framework.qual;
44+
}

docs/manual/contributors.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
Mahmood Ali,
7878
Manu Sridharan,
7979
Mark Roberts,
80+
Markus Frohme,
8081
Martin Kellogg,
8182
Matt Mullen,
8283
Maximilian Gama,

0 commit comments

Comments
 (0)