From f6e917587f2c6a82df1b64d949098cb8656b6417 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 bfebd2ef5b5fa13d1e48e8c5947ed1fc48a5870e Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Mon, 16 Nov 2020 14:06:02 +0530 Subject: [PATCH 2/3] Update sdk version to oreo Change-Id: I78b6f8ea78095bf01197fe10f5ecf364383a0ea1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 549464ee..2fb20f49 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-oreo' artifact ("e-ui-sdk.jar") pom { name = '/e/ UI SDK Library' -- GitLab From dba6daa5515333d0b5125b5b95dfb8b5ccf5ea16 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Tue, 17 Nov 2020 18:17:43 +0000 Subject: [PATCH 3/3] Restrict artifact publishing to v1-oreo only --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9afcefb..2b15238c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,6 +22,8 @@ build-sdk: - e-ui-sdk.jar publish: + only: + - v1-oreo stage: publish script: - 'gradle publish' -- GitLab