1 Star 0 Fork 2

junzai1225/djl-serving

forked from Azcarlo/djl-serving 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 3.96 KB
一键复制 编辑 原始数据 按行查看 历史
plugins {
id "com.github.spotbugs" version "4.7.1" apply false
}
defaultTasks 'build'
def serving_version = System.getenv("DJL_VERSION")
def stagingRepo = System.getenv("DJL_STAGING")
serving_version = (serving_version == null) ? djl_version : serving_version
if (!project.hasProperty("staging")) {
serving_version += "-SNAPSHOT"
}
allprojects {
group 'ai.djl.serving'
version "${serving_version}"
repositories {
mavenCentral()
mavenLocal()
maven {
url "https://oss.sonatype.org/service/local/repositories/${stagingRepo}/content/"
}
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
apply plugin: 'idea'
idea {
module {
outputDir = file('build/classes/java/main')
testOutputDir = file('build/classes/java/test')
// inheritOutputDirs = true
}
}
}
def javaProjects() {
return subprojects.findAll { new File(it.projectDir, "src/main").exists() }
}
configure(javaProjects()) {
apply plugin: 'java-library'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
compileJava.options.compilerArgs.addAll(["--release", "11"])
apply plugin: 'eclipse'
eclipse {
jdt.file.withProperties { props ->
props.setProperty "org.eclipse.jdt.core.circularClasspath", "warning"
}
classpath {
sourceSets.test.java {
srcDirs = ["src/test/java"]
exclude "**/package-info.java"
}
}
}
apply from: file("${rootProject.projectDir}/tools/gradle/java-formatter.gradle")
apply from: file("${rootProject.projectDir}/tools/gradle/check.gradle")
test {
// tensorflow mobilenet and resnet require more cpu memory
maxHeapSize = "4096m"
doFirst {
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
jvmArgs = [
'--add-opens', "java.base/jdk.internal.loader=ALL-UNNAMED"
]
}
}
useTestNG() {
// suiteXmlFiles << new File(rootDir, "testng.xml") //This is how to add custom testng.xml
}
testLogging {
showStandardStreams = true
events "passed", "skipped", "failed", "standardOut", "standardError"
}
doFirst {
systemProperties System.getProperties()
systemProperties.remove("user.dir")
// systemProperty "ai.djl.logging.level", "debug"
systemProperty "org.slf4j.simpleLogger.defaultLogLevel", "debug"
systemProperty "org.slf4j.simpleLogger.log.org.mortbay.log", "warn"
systemProperty "org.slf4j.simpleLogger.log.io.netty", "warn"
systemProperty "disableProgressBar", "true"
if (gradle.startParameter.offline) {
systemProperty "offline", "true"
}
// This is used to avoid overriding on default engine for modules:
// mxnet-engine, mxnet-model-zoo, api (MockEngine), basicdataset, fasttext, etc
if (project.name != "integration" && project.name != "examples") {
systemProperties.remove("ai.djl.default_engine")
}
}
}
compileJava {
options.compilerArgs << "-proc:none" << "-Xlint:all,-options,-static" << "-Werror"
}
compileTestJava {
options.compilerArgs << "-proc:none" << "-Xlint:all,-options,-static" << "-Werror"
}
jar {
manifest {
attributes(
"Automatic-Module-Name": "ai.djl.${project.name.replace('-', '_')}",
"Specification-Version": "${serving_version}"
)
}
}
}
apply from: file("${rootProject.projectDir}/tools/gradle/publish.gradle")
apply from: file("${rootProject.projectDir}/tools/gradle/jacoco.gradle")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/junzai1225/djl-serving.git
git@gitee.com:junzai1225/djl-serving.git
junzai1225
djl-serving
djl-serving
master

搜索帮助