removed module java.logging from module-info.javas

This commit is contained in:
Karl Tauber
2021-03-12 22:52:59 +01:00
parent 617a35c51b
commit 7c7ff289de
4 changed files with 11 additions and 5 deletions

View File

@@ -28,7 +28,7 @@ if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
} }
dependencies { dependencies {
add("java9Compile", sourceSets.main.get().output) add( "java9Compile", sourceSets.main.get().output )
} }
tasks { tasks {

View File

@@ -33,9 +33,17 @@ if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
sourceSets { sourceSets {
create( "module-info" ) { create( "module-info" ) {
java { java {
// include "src/main/java" here to get compile errors if classes are // include "src/main/java" and "src/main/java9" here to get compile errors if classes are
// used from other modules that are not specified in module dependencies // used from other modules that are not specified in module dependencies
setSrcDirs( listOf( "src/main/module-info", "src/main/java" ) ) setSrcDirs( listOf( "src/main/module-info", "src/main/java", "src/main/java9" ) )
// exclude Java 8 source file if an equally named Java 9+ source file exists
exclude {
if( it.isDirectory )
return@exclude false
val java9file = file( "${projectDir}/src/main/java9/${it.path}" )
java9file.exists() && java9file != it.file
}
} }
} }
} }

View File

@@ -19,7 +19,6 @@
*/ */
module com.formdev.flatlaf { module com.formdev.flatlaf {
requires java.desktop; requires java.desktop;
requires static java.logging;
exports com.formdev.flatlaf; exports com.formdev.flatlaf;
exports com.formdev.flatlaf.icons; exports com.formdev.flatlaf.icons;

View File

@@ -19,7 +19,6 @@
*/ */
module com.formdev.flatlaf.intellijthemes { module com.formdev.flatlaf.intellijthemes {
requires java.desktop; requires java.desktop;
requires java.logging;
requires com.formdev.flatlaf; requires com.formdev.flatlaf;
exports com.formdev.flatlaf.intellijthemes; exports com.formdev.flatlaf.intellijthemes;