xpipe-mirror/gradle/gradle_scripts/extension.gradle

89 lines
2.8 KiB
Groovy
Raw Permalink Normal View History

//task copyRuntimeLibs(type: Copy) {
// into project.jar.destinationDirectory
// from configurations.runtimeClasspath
// exclude "${project.name}.jar"
// duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
//}
// Do we need this?
// jar.dependsOn(copyRuntimeLibs)
2023-01-27 02:34:46 +00:00
2023-02-10 21:52:20 +00:00
def dev = tasks.register('createDevOutput', Copy) {
2024-04-13 16:23:09 +00:00
dependsOn jar
mustRunAfter jar
2023-04-10 15:22:07 +00:00
2023-04-04 16:11:31 +00:00
if (project.allExtensions.contains(project)) {
var source = "${project.jar.destinationDirectory.get()}"
from source
into "${project.rootDir}/app/build/ext_dev/$project.name"
}
2023-02-10 21:52:20 +00:00
}
jar.finalizedBy(dev)
2024-04-13 16:23:09 +00:00
project(':app').tasks.withType(JavaExec).configureEach {
dependsOn(dev)
}
2023-02-10 15:09:48 +00:00
tasks.register('createExtOutput', Copy) {
mustRunAfter jar
2023-04-10 15:22:07 +00:00
2023-02-19 17:44:47 +00:00
if (!file("${project.jar.destinationDirectory.get()}_prod").exists()) {
copy {
from "${project.jar.destinationDirectory.get()}"
into "${project.jar.destinationDirectory.get()}_prod"
2023-02-10 13:46:54 +00:00
}
}
def shouldObfuscate = rootProject.obfuscate && rootProject.privateExtensions.contains(project.name)
var source = shouldObfuscate ? "${project.jar.destinationDirectory.get()}_prod" : "${project.jar.destinationDirectory.get()}"
2023-02-19 17:44:47 +00:00
from source
into "${project.jar.destinationDirectory.get()}_ext"
2023-02-10 13:46:54 +00:00
}
project.tasks.withType(org.gradle.jvm.tasks.Jar).configureEach {
if (it.name != 'jar') {
it.destinationDirectory = project.layout.buildDirectory.dir('libs_test')
}
}
2023-01-27 02:34:46 +00:00
apply from: "$rootDir/gradle/gradle_scripts/java.gradle"
apply from: "$rootDir/gradle/gradle_scripts/javafx.gradle"
apply from: "$rootDir/gradle/gradle_scripts/lombok.gradle"
apply from: "$rootDir/gradle/gradle_scripts/local_junit_suite.gradle"
localTest {
dependencies {
if (project.name != 'base') {
implementation project(':base')
}
testImplementation project(":$project.name")
}
}
configurations {
compileOnly.extendsFrom(javafx)
}
2023-01-27 02:34:46 +00:00
dependencies {
2024-07-21 22:47:10 +00:00
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.17.2"
2023-02-19 17:44:47 +00:00
compileOnly project(':core')
compileOnly project(':beacon')
compileOnly project(':app')
2023-08-15 11:05:49 +00:00
compileOnly 'net.synedra:validatorfx:0.4.2'
compileOnly ('io.github.mkpaz:atlantafx-base:2.0.1') {
exclude group: 'org.openjfx', module: 'javafx-base'
exclude group: 'org.openjfx', module: 'javafx-controls'
}
2024-04-13 16:23:09 +00:00
compileOnly 'commons-io:commons-io:2.16.1'
compileOnly group: 'org.kordamp.ikonli', name: 'ikonli-javafx', version: "12.2.0"
2023-01-27 02:34:46 +00:00
if (project != project(':base')) {
compileOnly project(':base')
}
}
// To fix https://github.com/gradlex-org/extra-java-module-info/issues/101#issuecomment-1934761334
configurations.javaModulesMergeJars.shouldResolveConsistentlyWith(configurations.compileClasspath)