Darklaf - A themeable swing Look and Feel based on Darcula-Laf
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

plugins {
java
id("dev.nokee.jni-library")
id("dev.nokee.objective-cpp-language")
`uber-jni-jar`
`use-prebuilt-binaries`
`apple-m1-toolchain`
}
val nativeResourcePath = "com/github/weisj/darklaf/platform/${project.name}"
library {
dependencies {
jvmImplementation(projects.darklafThemeSpec)
jvmImplementation(projects.darklafUtils)
jvmImplementation(projects.darklafNativeUtils)
jvmImplementation(projects.darklafPlatformBase)
// nativeLibImplementation(macOsFrameworks.appKit)
// nativeLibImplementation(macOsFrameworks.cocoa)
}
targetMachines.addAll(machines.macOS.x86_64, machines.macOS.architecture("arm64"))
variants.configureEach {
resourcePath.set(nativeResourcePath)
sharedLibrary {
val isArm = targetMachine.architectureString == "arm64"
val minOs = if (isArm) "11" else "10.10"
compileTasks.configureEach {
compilerArgs.addAll("-mmacosx-version-min=$minOs")
// Build type not modeled yet, assuming release
optimizedBinary()
}
linkTask.configure {
linkerArgs.addAll(
2 years ago
"-lobjc",
"-mmacosx-version-min=$minOs",
"-framework",
"AppKit",
"-framework",
4 months ago
"Cocoa",
)
}
}
}
}