From f192636b82f1c99b871b074a988f86088fea531c Mon Sep 17 00:00:00 2001 From: Adnan Begovic Date: Fri, 7 Aug 2015 13:28:17 -0700 Subject: [PATCH] vendor/cm: Always use gpg sign-and-deploy for deployments. - Also support LOCAL_MAVEN_SOURCES and LOCAL_MAVEN_JAVADOC Change-Id: Icfab8d23d8a9e9993eb74adf7349439bc4b6d1ed --- build/core/maven_artifact_publish.mk | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/build/core/maven_artifact_publish.mk b/build/core/maven_artifact_publish.mk index e9359926..f0dd9a41 100644 --- a/build/core/maven_artifact_publish.mk +++ b/build/core/maven_artifact_publish.mk @@ -27,22 +27,32 @@ ifeq ($(strip $(LOCAL_MAVEN_REPO_ID)),) $(error LOCAL_MAVEN_REPO_ID not defined.) endif ifeq ($(strip $(LOCAL_MAVEN_CLASSIFIER)),) - $(info classifier not set) + $(info LOCAL_MAVEN_CLASSIFIER not set) endif +ifeq ($(strip $(LOCAL_MAVEN_SOURCES)),) + $(info LOCAL_MAVEN_SOURCES not set) +endif +ifeq ($(strip $(LOCAL_MAVEN_JAVADOC)),) + $(info LOCAL_MAVEN_JAVADOC not set) +endif + $(full_target): pomfile := $(LOCAL_MAVEN_POM) $(full_target): repo := $(LOCAL_MAVEN_REPO) $(full_target): path_to_file := $(LOCAL_MAVEN_FILE_PATH) $(full_target): repoId := $(LOCAL_MAVEN_REPO_ID) $(full_target): classifier := $(LOCAL_MAVEN_CLASSIFIER) +$(full_target): sources := $(LOCAL_MAVEN_SOURCES) +$(full_target): javadoc := $(LOCAL_MAVEN_JAVADOC) $(full_target): - $(hide) mvn -e -X deploy:deploy-file \ - -DpomFile=$(pomfile) \ + $(hide) mvn -e -X gpg:sign-and-deploy-file \ + -DpomFile=$(pomfile) \ -Durl=$(repo) \ -Dfile=$(path_to_file) \ -DrepositoryId=$(repoId) \ - -Dclassifier=$(classifier) + -Dclassifier=$(classifier) \ + -Dsources=$(sources) \ + -Djavadoc=$(javadoc) @echo -e ${CL_GRN}"Publishing:"${CL_RST}" $@" - $(LOCAL_MODULE) : $(full_target) \ No newline at end of file