diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c7db0f156ce6176e3fd2b8a445f8d826eca6b43..de6e1d9b00a1348acaf05fed15b109afbd72a84b 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,11 @@ build-sdk: - ./buildSdk.sh artifacts: paths: - - e-ui-sdk.jar \ No newline at end of file + - e-ui-sdk.jar + +publish: + only: + - v1-q + stage: publish + script: + - 'gradle publish' diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..7faef0ccb8dfb831983de26d6714bbcc2cc8c171 --- /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-q' + 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) + } + } + } +}