IntelliJ Themes: added Java 9 module descriptor to flatlaf-intellij-themes-<version>.jar

This commit is contained in:
Karl Tauber
2020-04-27 18:25:49 +02:00
parent 129bc9b3ae
commit 44c455419b
6 changed files with 67 additions and 6 deletions

View File

@@ -25,6 +25,18 @@ dependencies {
implementation( project( ":flatlaf-core" ) )
}
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
sourceSets {
create( "module-info" ) {
java {
// include "src/main/java" here to get compile errors if classes are
// used from other modules that are not specified in module dependencies
setSrcDirs( listOf( "src/main/module-info", "src/main/java" ) )
}
}
}
}
tasks {
assemble {
dependsOn(
@@ -33,6 +45,26 @@ tasks {
)
}
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
named<JavaCompile>( "compileModuleInfoJava" ) {
sourceCompatibility = "9"
targetCompatibility = "9"
dependsOn( ":flatlaf-core:jar" )
options.compilerArgs.add( "--module-path" )
options.compilerArgs.add( project( ":flatlaf-core" ).tasks["jar"].outputs.files.asPath )
}
}
jar {
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
from( sourceSets["module-info"].output ) {
include( "module-info.class" )
}
}
}
javadoc {
options {
this as StandardJavadocDocletOptions