Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maven publish task to python engine #13

Merged
merged 1 commit into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions engines/python/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
id "maven-publish"
id "signing"
}

group "ai.djl.python"

dependencies {
Expand Down Expand Up @@ -46,3 +51,85 @@ task formatPython {
}
}
}

java {
withJavadocJar()
withSourcesJar()
}

javadoc {
title "DJL Engine Adapter for Python ${version}"
options.encoding = "UTF-8"
options.overview "src/main/javadoc/overview.html"
options.addBooleanOption("-allow-script-in-comments", true)
}

signing {
required(project.hasProperty("staging") || project.hasProperty("snapshot"))
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}

publishing {
publications {
maven(MavenPublication) {
from components.java
artifacts = [jar, javadocJar, sourcesJar]
pom {
name = "DJL Engine Adapter for Python"
description = "Deep Java Library (DJL) Engine Adapter for Python"
url = "https://github.com/deepjavalibrary/djl-serving/tree/master/engines/python"

packaging = "jar"

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0'
}
}

scm {
connection = "scm:git:git@github.com:deepjavalibrary/djl-serving.git"
developerConnection = "scm:git:git@github.com:deepjavalibrary/djl-serving.git"
url = "https://github.com/deepjavalibrary/djl-serving"
tag = "HEAD"
}

developers {
developer {
name = "DJL.AI Team"
email = "djl-dev@amazon.com"
organization = "Amazon AI"
organizationUrl = "https://amazon.com"
}
}
}
}
}

repositories {
maven {
if (project.hasProperty("snapshot")) {
name = "snapshot"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
credentials {
username = findProperty("ossrhUsername")
password = findProperty("ossrhPassword")
}
} else if (project.hasProperty("staging")) {
name = "staging"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = findProperty("ossrhUsername")
password = findProperty("ossrhPassword")
}
} else {
name = "local"
url = "build/repo"
}
}
}
}
7 changes: 0 additions & 7 deletions wlm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ plugins {
id "signing"
}

group "ai.djl"

dependencies {
api platform("ai.djl:bom:${project.version}")
api "ai.djl:api"
Expand All @@ -27,11 +25,6 @@ javadoc {
options.addBooleanOption("-allow-script-in-comments", true)
}

task uploadJavadoc(type: Exec) {
dependsOn javadoc
commandLine "sh", "-c", "find . -name .DS_Store | xargs rm && aws s3 sync build/docs/javadoc s3://javadoc-djl-ai/${project.name}/${version} > build/upload.log"
}

signing {
required(project.hasProperty("staging") || project.hasProperty("snapshot"))
def signingKey = findProperty("signingKey")
Expand Down