gradle: build target flatlaf-natives-windows only on Windows

(to fix build error on macOS)
This commit is contained in:
Karl Tauber
2022-04-09 18:34:36 +02:00
parent 7b11339fdc
commit f21261914b
2 changed files with 6 additions and 4 deletions

View File

@@ -45,7 +45,8 @@ tasks {
processResources {
// build native libraries
dependsOn( ":flatlaf-natives-windows:assemble" )
if( org.gradle.internal.os.OperatingSystem.current().isWindows )
dependsOn( ":flatlaf-natives-windows:assemble" )
}
jar {

View File

@@ -25,9 +25,10 @@ include( "flatlaf-demo" )
include( "flatlaf-testing" )
include( "flatlaf-theme-editor" )
includeProject( "flatlaf-natives-windows", "flatlaf-natives/flatlaf-natives-windows" )
includeProject( "flatlaf-natives-jna", "flatlaf-natives/flatlaf-natives-jna" )
includeProject( "flatlaf-testing-modular-app", "flatlaf-testing/flatlaf-testing-modular-app" )
if( org.gradle.internal.os.OperatingSystem.current().isWindows )
includeProject( "flatlaf-natives-windows", "flatlaf-natives/flatlaf-natives-windows" )
includeProject( "flatlaf-natives-jna", "flatlaf-natives/flatlaf-natives-jna" )
includeProject( "flatlaf-testing-modular-app", "flatlaf-testing/flatlaf-testing-modular-app" )
fun includeProject( projectPath: String, projectDir: String ) {
include( projectPath )