From 481b34ec399035ab69641ad286671d533dc4aa62 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Mon, 16 Nov 2020 14:04:24 +0530 Subject: [PATCH 1/3] Publish /e/ UI Sdk to gitlab maven package registry Change-Id: I8739815a6de42b51babfe2237360e42b678775e4 --- .gitlab-ci.yml | 8 +++++++- build.gradle | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 build.gradle diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c7db0f1..a9afcefb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - update-from-upstream - build-sdk + - publish include: - project: 'e/priv/os/build' @@ -18,4 +19,9 @@ build-sdk: - ./buildSdk.sh artifacts: paths: - - e-ui-sdk.jar \ No newline at end of file + - e-ui-sdk.jar + +publish: + stage: publish + script: + - 'gradle publish' diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..549464ee --- /dev/null +++ b/build.gradle @@ -0,0 +1,46 @@ +plugins { + id 'maven-publish' +} + +publishing { + publications { + maven(MavenPublication) { + groupId = 'foundation.e' + artifactId = 'e-ui-sdk' + version = '1.0-pie' + artifact ("e-ui-sdk.jar") + pom { + name = '/e/ UI SDK Library' + description = 'A design library to be used specifically for /e/ OS to have common themes across the apps.' + url = 'https://gitlab.e.foundation/e/os/android_lineage-sdk' + licenses { + license { + name = 'The Apache License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id = 'amitkumar' + name = 'Amit Kumar' + email = 'amitkma@e.email' + } + } + } + } + } + + repositories { + maven { + url "https://gitlab.e.foundation/api/v4/projects/185/packages/maven" + name "GitLab" + credentials(HttpHeaderCredentials) { + name = 'Job-Token' + value = System.getenv("CI_JOB_TOKEN") + } + authentication { + header(HttpHeaderAuthentication) + } + } + } +} -- GitLab From 6a41388c735f779268c908757a84197d6d41f89d Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Mon, 16 Nov 2020 14:07:09 +0530 Subject: [PATCH 2/3] Update sdk version to Q Change-Id: I1f00e97f6bf0e2790443a2179033a5f2ecac2e8b --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 549464ee..7faef0cc 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ publishing { maven(MavenPublication) { groupId = 'foundation.e' artifactId = 'e-ui-sdk' - version = '1.0-pie' + version = '1.0-q' artifact ("e-ui-sdk.jar") pom { name = '/e/ UI SDK Library' -- GitLab From 0ac093c7463a7bd42ed8db3ae2e3ce491aceaea1 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Tue, 17 Nov 2020 18:19:10 +0000 Subject: [PATCH 3/3] Restrict artifact publishing to v1-q only --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9afcefb..de6e1d9b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,6 +22,8 @@ build-sdk: - e-ui-sdk.jar publish: + only: + - v1-q stage: publish script: - 'gradle publish' -- GitLab