2022-09-20 15:40:53 +02:00
|
|
|
plugins {
|
|
|
|
id 'java-library'
|
|
|
|
id 'maven-publish'
|
2022-10-24 10:42:07 +02:00
|
|
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
2022-09-20 15:40:53 +02:00
|
|
|
}
|
|
|
|
|
2022-10-24 15:36:39 +02:00
|
|
|
apply from: rootProject.projectDir.path+"/chooseBackend.gradle"
|
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
dependencies {
|
|
|
|
//Todo clean this
|
|
|
|
api platform(project(":cavis-common-platform"))
|
2022-10-14 12:32:41 +02:00
|
|
|
//api "org.bytedeco:javacpp:1.5.7" //for some reason we needed to apply version numbers here, they do not end up in POM otherwise
|
2022-10-24 17:32:35 +02:00
|
|
|
//api "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.10.5"
|
|
|
|
//api 'org.slf4j:slf4j-simple:2.0.3'
|
|
|
|
//api 'org.slf4j:slf4j-api:2.0.3'
|
2022-10-14 12:32:41 +02:00
|
|
|
//TODO for the two below.. either platform specific uber jars or a single big one with all platforms
|
2022-10-24 17:32:35 +02:00
|
|
|
//api group: "org.bytedeco", name: "javacpp", version: "1.5.7", classifier: "linux-x86_64"
|
2022-10-24 14:22:22 +02:00
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
rootProject.getAllprojects().each { Project sproj ->
|
2022-10-24 14:22:22 +02:00
|
|
|
if (!sproj.name.equals(name) && !sproj.name.equals("cavis-common-platform")
|
2022-09-20 15:40:53 +02:00
|
|
|
&& !sproj.name.equals("Cavis")
|
|
|
|
&& !sproj.name.equals("cavis-datavec")
|
|
|
|
&& !sproj.name.equals("cavis-dnn")
|
|
|
|
&& !sproj.name.equals("cavis-native")
|
|
|
|
&& !sproj.name.equals("cavis-nd4j")
|
|
|
|
&& !sproj.name.equals("cavis-ui")
|
|
|
|
&& !sproj.name.equals("cavis-zoo")) {
|
2022-10-24 14:29:10 +02:00
|
|
|
api sproj
|
|
|
|
}
|
|
|
|
}
|
2022-10-24 17:32:35 +02:00
|
|
|
/*
|
2022-10-24 15:36:39 +02:00
|
|
|
api(projects.cavisNative.cavisNativeLib) {
|
2022-10-24 14:29:10 +02:00
|
|
|
capabilities {
|
2022-10-24 15:36:39 +02:00
|
|
|
if(withCuda()) it.requireCapability(group: "net.brutex.cavis.cavis-native", name: "cavis-native-lib-cuda-support", version: project.version)
|
|
|
|
if(withCpu()) it.requireCapability(group: "net.brutex.cavis.cavis-native", name: "cavis-native-lib-cpu-support", version: project.version)
|
2022-09-20 15:40:53 +02:00
|
|
|
}
|
|
|
|
}
|
2022-10-24 17:32:35 +02:00
|
|
|
*/
|
2022-10-25 13:37:36 +02:00
|
|
|
//if(withCpu()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cpuSupportImplementation")
|
|
|
|
//if(withCuda()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportImplementation")
|
2022-10-25 09:03:46 +02:00
|
|
|
//if(withCuda()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportCompileClasspath")
|
2022-10-24 17:32:35 +02:00
|
|
|
|
2022-10-24 18:04:38 +02:00
|
|
|
/*
|
2022-10-24 17:32:35 +02:00
|
|
|
api (project(':cavis-native:cavis-native-lib')) {
|
|
|
|
capabilities {
|
|
|
|
if(withCpu()) requireCapability("net.brutex.cavis.cavis-native:cavis-native-lib-cpu-support")
|
|
|
|
//if(withCuda()) requireCapability("net.brutex.cavis.cavis-native:cavis-native-lib-cuda-support")
|
|
|
|
}
|
|
|
|
}
|
2022-10-24 18:04:38 +02:00
|
|
|
*/
|
2022-09-20 15:40:53 +02:00
|
|
|
}
|
|
|
|
|
2022-10-24 14:29:10 +02:00
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
/*
|
|
|
|
tasks.getByName("jar") {
|
|
|
|
|
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': 'net.brutex.ai.Dummy'
|
|
|
|
}
|
|
|
|
zip64=true
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
from {
|
|
|
|
configurations.compileClasspath.collect { File f ->
|
|
|
|
if (f.exists()) {
|
|
|
|
f.isDirectory() ? f : zipTree(f)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations.runtimeClasspath.collect { File f ->
|
|
|
|
if (f.exists()) {
|
|
|
|
f.isDirectory() ? f : zipTree(f)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
|
|
|
|
/*
|
|
|
|
artifacts {
|
|
|
|
archives customFatJar
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
2022-10-24 10:47:43 +02:00
|
|
|
shadowJar {
|
2022-10-24 15:36:39 +02:00
|
|
|
enabled false;
|
2022-10-24 10:47:43 +02:00
|
|
|
zip64 true //need this to support jars with more than 65535 entries
|
|
|
|
}
|
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
// artifact customFatJar
|
|
|
|
// from components.java
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-12 11:01:57 +02:00
|
|
|
|
|
|
|
|