2024-02-28 07:36:31 +00:00
|
|
|
//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
|
2024-02-28 07:36:31 +00:00
|
|
|
mustRunAfter jar
|
2023-04-10 15:22:07 +00:00
|
|
|
|
2024-08-16 10:23:49 +00:00
|
|
|
// Project equality does no longer work in gradle 8.10
|
|
|
|
if (project.allExtensions.stream().map(p -> p.toString()).toList().contains(project.toString())) {
|
2023-04-04 16:11:31 +00:00
|
|
|
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) {
|
2024-02-28 07:36:31 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2024-02-28 07:36:31 +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"
|
2024-02-28 07:36:31 +00:00
|
|
|
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'
|
2023-06-19 16:05:26 +00:00
|
|
|
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'
|
2024-02-28 07:36:31 +00:00
|
|
|
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')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-28 07:36:31 +00:00
|
|
|
// To fix https://github.com/gradlex-org/extra-java-module-info/issues/101#issuecomment-1934761334
|
|
|
|
configurations.javaModulesMergeJars.shouldResolveConsistentlyWith(configurations.compileClasspath)
|
|
|
|
|