mirror of https://github.com/weisJ/darklaf.git
darculadarcula-themefeelguihacktoberfestintellijintellij-themelaflooklookandfeelnativesolarizedsolarized-dark-themesolarized-light-themesvgswingthemethemes
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.
54 lines
1.9 KiB
54 lines
1.9 KiB
import org.gradle.util.VersionNumber |
|
|
|
plugins { |
|
java |
|
id("dev.nokee.jni-library") |
|
id("dev.nokee.objective-cpp-language") |
|
`uber-jni-jar` |
|
`use-prebuilt-binaries` |
|
} |
|
|
|
library { |
|
dependencies { |
|
jvmImplementation(projects.darklafTheme) |
|
jvmImplementation(projects.darklafNativeUtils) |
|
jvmImplementation(projects.darklafUtils) |
|
jvmImplementation(projects.darklafPlatformBase) |
|
jvmImplementation(projects.darklafPropertyLoader) |
|
nativeLibImplementation(libs.macos.appKit) |
|
nativeLibImplementation(libs.macos.cocoa) |
|
val xCodeVersion = getXCodeVersion() |
|
if (xCodeVersion != null && xCodeVersion >= VersionNumber.parse("12.2")) { |
|
nativeLibImplementation(libs.macos.javaNativeFoundation) |
|
} else { |
|
nativeLibImplementation(libs.macosLegacy.javaVM.base) |
|
nativeLibImplementation(libs.macosLegacy.javaVM.base) { |
|
capabilities { |
|
requireLibCapability(libs.macosLegacy.javaVM.capability.javaNativeFoundation) |
|
} |
|
} |
|
} |
|
} |
|
|
|
targetMachines.addAll(machines.macOS.x86_64) |
|
variants.configureEach { |
|
resourcePath.set("com/github/weisj/darklaf/platform/${project.name}/${targetMachine.variantName}") |
|
sharedLibrary { |
|
val minOs = "10.10" |
|
compileTasks.configureEach { |
|
compilerArgs.addAll("-mmacosx-version-min=$minOs") |
|
// Build type not modeled yet, assuming release |
|
compilerArgs.addAll(toolChain.map { |
|
when (it) { |
|
is Gcc, is Clang -> listOf("-O2") |
|
is VisualCpp -> listOf("/O2") |
|
else -> emptyList() |
|
} |
|
}) |
|
} |
|
linkTask.configure { |
|
linkerArgs.addAll("-lobjc", "-mmacosx-version-min=$minOs") |
|
} |
|
} |
|
} |
|
}
|
|
|