mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-02-20 08:06:20 -05:00
185 lines
6.6 KiB
Groovy
185 lines
6.6 KiB
Groovy
plugins {
|
|
id 'application'
|
|
id 'jvm-test-suite'
|
|
id 'java-library'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
apply from: "$rootDir/gradle/gradle_scripts/java.gradle"
|
|
apply from: "$rootDir/gradle/gradle_scripts/javafx.gradle"
|
|
apply from: "$rootDir/gradle/gradle_scripts/jna.gradle"
|
|
apply from: "$rootDir/gradle/gradle_scripts/lombok.gradle"
|
|
|
|
configurations {
|
|
implementation.extendsFrom(javafx)
|
|
api.extendsFrom(jna)
|
|
}
|
|
|
|
dependencies {
|
|
api project(':core')
|
|
api project(':beacon')
|
|
|
|
compileOnly 'org.hamcrest:hamcrest:3.0'
|
|
compileOnly 'org.junit.jupiter:junit-jupiter-api:5.13.4'
|
|
compileOnly 'org.junit.jupiter:junit-jupiter-params:5.13.4'
|
|
|
|
api 'com.vladsch.flexmark:flexmark:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-options:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-data:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-ast:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-builder:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-sequence:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-misc:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-dependency:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-collection:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-format:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-html:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-util-visitor:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-ext-tables:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-ext-footnotes:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-ext-definition:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-ext-anchorlink:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-ext-yaml-front-matter:0.64.8'
|
|
api 'com.vladsch.flexmark:flexmark-ext-toc:0.64.8'
|
|
|
|
api ('io.modelcontextprotocol.sdk:mcp-core:0.14.1') {
|
|
exclude group: "com.ethlo.time", module: "itu"
|
|
}
|
|
api ('io.modelcontextprotocol.sdk:mcp-json:0.14.1') {
|
|
exclude group: "com.ethlo.time", module: "itu"
|
|
}
|
|
api ('io.modelcontextprotocol.sdk:mcp-json-jackson2:0.13.0') {
|
|
exclude group: "com.ethlo.time", module: "itu"
|
|
exclude group: "com.fasterxml.jackson.dataformat", module: "jackson-dataformat-yaml"
|
|
}
|
|
|
|
api "io.projectreactor:reactor-core:3.7.9"
|
|
api "org.reactivestreams:reactive-streams:1.0.4"
|
|
api ("com.networknt:json-schema-validator:1.5.8") {
|
|
exclude group: "com.ethlo.time", module: "itu"
|
|
exclude group: "com.fasterxml.jackson.dataformat", module: "jackson-dataformat-yaml"
|
|
}
|
|
|
|
api "com.github.weisj:jsvg:1.7.2"
|
|
api 'io.xpipe:vernacular:1.16'
|
|
api 'org.bouncycastle:bcprov-jdk18on:1.81'
|
|
api 'info.picocli:picocli:4.7.7'
|
|
api 'org.apache.commons:commons-lang3:3.18.0'
|
|
api 'io.sentry:sentry:8.20.0'
|
|
api 'commons-io:commons-io:2.20.0'
|
|
api "com.fasterxml.jackson.core:jackson-databind:2.20.0"
|
|
api "com.fasterxml.jackson.core:jackson-annotations:2.20"
|
|
api "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0"
|
|
api "org.kordamp.ikonli:ikonli-material2-pack:12.4.0"
|
|
api "org.kordamp.ikonli:ikonli-materialdesign2-pack:12.4.0"
|
|
api 'org.kordamp.ikonli:ikonli-bootstrapicons-pack:12.4.0'
|
|
api "org.kordamp.ikonli:ikonli-javafx:12.4.0"
|
|
api "org.slf4j:slf4j-api:2.0.17"
|
|
api "org.slf4j:slf4j-jdk-platform-logging:2.0.17"
|
|
api 'io.xpipe:modulefs:0.1.7'
|
|
api 'net.synedra:validatorfx:0.4.2'
|
|
api files("$rootDir/gradle/gradle_scripts/atlantafx-base-2.0.2.jar")
|
|
}
|
|
|
|
apply from: "$rootDir/gradle/gradle_scripts/local_junit_suite.gradle"
|
|
|
|
def extensionJarDepList = project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)).toList()
|
|
jar {
|
|
finalizedBy(extensionJarDepList)
|
|
}
|
|
|
|
application {
|
|
mainModule = groupName + '.app'
|
|
mainClass = groupName + '.app.Main'
|
|
applicationDefaultJvmArgs = jvmRunArgs
|
|
}
|
|
|
|
run {
|
|
systemProperty propertyName('useVirtualThreads'), 'false'
|
|
systemProperty propertyName('mode'), 'gui'
|
|
systemProperty propertyName('writeLogs'), "true"
|
|
systemProperty propertyName('writeSysOut'), "true"
|
|
systemProperty propertyName('developerMode'), "true"
|
|
systemProperty propertyName('logLevel'), "trace"
|
|
systemProperty propertyName('fullVersion'), fullVersion
|
|
systemProperty propertyName('staging'), isStage
|
|
|
|
// Apply passed xpipe properties
|
|
for (final def e in System.getProperties().entrySet()) {
|
|
if (e.getKey().toString().contains(snakeProductName)) {
|
|
systemProperty e.getKey().toString(), e.getValue()
|
|
}
|
|
}
|
|
|
|
workingDir = rootDir
|
|
jvmArgs += ['-XX:+EnableDynamicAgentLoading']
|
|
|
|
def exts = files(project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)[0].outputs.files.singleFile).toList())
|
|
classpath += exts
|
|
|
|
dependsOn(project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)[0]).toList())
|
|
}
|
|
|
|
tasks.register('runAttachedDebugger', JavaExec) {
|
|
workingDir = rootDir
|
|
classpath = run.classpath
|
|
mainModule = groupName + '.app'
|
|
mainClass = groupName + '.app.Main'
|
|
modularity.inferModulePath = true
|
|
jvmArgs += jvmRunArgs
|
|
jvmArgs += List.of(
|
|
"-javaagent:${System.getProperty("user.home")}/.attachme/attachme-agent-1.2.9.jar=port:7857,host:localhost".toString(),
|
|
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0"
|
|
)
|
|
jvmArgs += ['-XX:+EnableDynamicAgentLoading']
|
|
systemProperties run.systemProperties
|
|
|
|
def exts = files(project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)[0].outputs.files.singleFile).toList())
|
|
classpath += exts
|
|
dependsOn(project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)[0]).toList())
|
|
|
|
}
|
|
|
|
processResources {
|
|
doLast {
|
|
def cssFiles = fileTree(dir: "$sourceSets.main.output.resourcesDir/io/xpipe/app/resources/style")
|
|
cssFiles.include "**/*.css"
|
|
cssFiles.each { css ->
|
|
providers.javaexec {
|
|
workingDir = projectDir
|
|
jvmArgs += ["--module-path=${configurations.javafx.asFileTree.asPath},", "--add-modules=javafx.graphics"]
|
|
mainClass = "com.sun.javafx.css.parser.Css2Bin"
|
|
args css
|
|
}.result.get()
|
|
|
|
delete css
|
|
}
|
|
}
|
|
|
|
doLast {
|
|
def resourcesDir = new File(sourceSets.main.output.resourcesDir, "io/xpipe/app/resources/third-party")
|
|
resourcesDir.mkdirs()
|
|
copy {
|
|
from "$rootDir/dist/licenses"
|
|
into resourcesDir
|
|
}
|
|
}
|
|
}
|
|
|
|
distTar {
|
|
enabled = false
|
|
}
|
|
|
|
distZip {
|
|
enabled = false
|
|
}
|
|
|
|
assembleDist {
|
|
enabled = false
|
|
} |