diff options
author | Adnan Begovic <adnan@cyngn.com> | 2015-08-05 17:03:06 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-08-06 20:43:49 -0700 |
commit | 44716fb0eefb1864aaa12b412ace0985e1904436 (patch) | |
tree | 3913335146e31ee111717c26f094accdcb7f387b /build | |
parent | d0f6b187ae9bd7e774fbde786a07c7decf0d0bd6 (diff) | |
download | vendor_replicant-44716fb0eefb1864aaa12b412ace0985e1904436.tar.gz vendor_replicant-44716fb0eefb1864aaa12b412ace0985e1904436.tar.bz2 vendor_replicant-44716fb0eefb1864aaa12b412ace0985e1904436.zip |
vendor/cm: Provide means of uploading an artifact to maven.
Change-Id: Ide225d75807a917773520ae1b7772e8de9b1ab73
Diffstat (limited to 'build')
-rw-r--r-- | build/core/config.mk | 1 | ||||
-rw-r--r-- | build/core/maven_artifact_publish.mk | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/build/core/config.mk b/build/core/config.mk index 3f6e0a27..e3b19487 100644 --- a/build/core/config.mk +++ b/build/core/config.mk @@ -24,3 +24,4 @@ FRAMEWORK_CM_PLATFORM_SYSTEM_API_FILE := $(TOPDIR)vendor/cmsdk/system-api/cm_sys FRAMEWORK_CM_PLATFORM_SYSTEM_REMOVED_API_FILE := $(TOPDIR)vendor/cmsdk/system-api/cm_system-removed.txt BUILD_MAVEN_PREBUILT := $(TOP)/vendor/cm/build/core/maven_artifact.mk +PUBLISH_MAVEN_PREBUILT := $(TOP)/vendor/cm/build/core/maven_artifact_publish.mk diff --git a/build/core/maven_artifact_publish.mk b/build/core/maven_artifact_publish.mk new file mode 100644 index 00000000..e9359926 --- /dev/null +++ b/build/core/maven_artifact_publish.mk @@ -0,0 +1,48 @@ +# Copyright (C) 2015 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +full_target := $(call doc-timestamp-for,$(LOCAL_MODULE)) + +ifeq ($(strip $(LOCAL_MAVEN_POM)),) + $(error LOCAL_MAVEN_POM not defined.) +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.) +endif +ifeq ($(strip $(LOCAL_MAVEN_REPO_ID)),) + $(error LOCAL_MAVEN_REPO_ID not defined.) +endif +ifeq ($(strip $(LOCAL_MAVEN_CLASSIFIER)),) + $(info classifier 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): + $(hide) mvn -e -X deploy:deploy-file \ + -DpomFile=$(pomfile) \ + -Durl=$(repo) \ + -Dfile=$(path_to_file) \ + -DrepositoryId=$(repoId) \ + -Dclassifier=$(classifier) + @echo -e ${CL_GRN}"Publishing:"${CL_RST}" $@" + +$(LOCAL_MODULE) : $(full_target)
\ No newline at end of file |