Commit ee91e0ac authored by Arun Babu Neelicattu's avatar Arun Babu Neelicattu
Browse files

ci/android: publish package (wip)

parent e6d47291
Pipeline #3437 failed with stages
in 2 minutes and 34 seconds
......@@ -15,6 +15,7 @@ before_script:
- echo "ndk.dir=${ANDROID_NDK_HOME}" >> ./android/local.properties
- cp -R $ANDROID_SDK_ROOT/licenses ./android/.
- chmod +x ./android/gradlew
- pushd android
cache:
key: ${CI_PROJECT_ID}
......@@ -23,10 +24,7 @@ cache:
build:android:aar:
stage: build
tags:
- docker
script:
- pushd android
- ./gradlew clean assembleRelease
artifacts:
expire_in: 1 weeks
......@@ -36,11 +34,16 @@ build:android:aar:
test:android:aar:
stage: test
tags:
- docker
script:
- pushd android
# TODO: fix this?
- echo "TODO fix this?"
# - ./gradlew test
needs:
- build:android:aar
publish:android:aar:
stage: test
script:
- ./gradlew publish
needs:
- build:android:aar
- test:android:aar
......@@ -13,6 +13,11 @@ buildscript {
}
}
plugins {
id 'java'
id 'maven-publish'
}
allprojects {
repositories {
mavenCentral()
......@@ -20,6 +25,22 @@ allprojects {
}
}
task clean(type: Delete) {
delete rootProject.buildDir
publishing {
publications {
library(MavenPublication) {
from components.java
}
}
repositories {
maven {
url "https://gitlab.matrix.org/api/v4/projects/27/packages/maven"
credentials(HttpHeaderCredentials) {
name = 'Job-Token'
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment