summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-01-05 14:13:30 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-01-05 17:36:46 -0800
commit4198cf685f2403fa51acb6730387c92ddfd52c33 (patch)
tree5d2874faa869b7ff584130afb43ef87fdb98dc40 /build
parent139e798bf91cbe3e65c0c81e602ab5f6ee6d6085 (diff)
downloadvendor_replicant-4198cf685f2403fa51acb6730387c92ddfd52c33.zip
vendor_replicant-4198cf685f2403fa51acb6730387c92ddfd52c33.tar.gz
vendor_replicant-4198cf685f2403fa51acb6730387c92ddfd52c33.tar.bz2
cm: Modify maven artifact publish makefile.
Now allows you to specify a target module to be compiled prior to publish via LOCAL_MAVEN_TARGET_MODULE. This utilizes the definition for intermediates-dir-for on the target module after it sets an explicit dependency from remote to local module. Change-Id: I65b5e07fdcc3368e350b1935ccca381b74dce59e
Diffstat (limited to 'build')
-rw-r--r--build/core/maven_artifact_publish.mk18
1 files changed, 11 insertions, 7 deletions
diff --git a/build/core/maven_artifact_publish.mk b/build/core/maven_artifact_publish.mk
index f984473..5746f95 100644
--- a/build/core/maven_artifact_publish.mk
+++ b/build/core/maven_artifact_publish.mk
@@ -20,30 +20,34 @@ endif
ifeq ($(strip $(LOCAL_MAVEN_REPO)),)
$(error LOCAL_MAVEN_REPO not defined.)
endif
-ifeq ($(strip $(LOCAL_MAVEN_FILE_PATH)),)
- $(error LOCAL_MAVEN_FILE_PATH not defined.)
+ifeq ($(strip $(LOCAL_MAVEN_TARGET_MODULE)),)
+ $(error LOCAL_MAVEN_TARGET_MODULE not defined.)
endif
ifeq ($(strip $(LOCAL_MAVEN_REPO_ID)),)
$(error LOCAL_MAVEN_REPO_ID not defined.)
endif
-
$(full_target): pomfile := $(LOCAL_MAVEN_POM)
$(full_target): repo := $(LOCAL_MAVEN_REPO)
-$(full_target): path_to_file := $(LOCAL_MAVEN_FILE_PATH)
+$(full_target): path_to_file := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MAVEN_TARGET_MODULE),,COMMON)/javalib.jar
$(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): artifact_path := $(LOCAL_MAVEN_ARTIFACT_PATH)
+$(full_target): artifact_path ?= $(basename $(path_to_file))
-$(full_target):
+$(full_target): $(LOCAL_MAVEN_TARGET_MODULE) $(path_to_file) $(artifact_path) $(ACP)
+ @echo -e ${CL_GRN}"Renaming generated sdk javalib jar"${CL_RST}
+ $(hide) $(ACP) $(path_to_file) $(artifact_path)
+ @echo -e ${CL_GRN}"Publishing to Maven"${CL_RST}
$(hide) mvn -e -X gpg:sign-and-deploy-file \
-DpomFile=$(pomfile) \
-Durl=$(repo) \
- -Dfile=$(path_to_file) \
+ -Dfile=$(artifact_path) \
-DrepositoryId=$(repoId) \
-Dclassifier=$(classifier) \
-Dsources=$(sources) \
-Djavadoc=$(javadoc)
@echo -e ${CL_GRN}"Publishing:"${CL_RST}" $@"
-$(LOCAL_MODULE) : $(full_target) \ No newline at end of file
+$(LOCAL_MODULE): $(full_target) \ No newline at end of file