Merge branch 'feature_ci' of kanban/wedroid into develop
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Umberto Furno 2020-01-14 20:20:12 +00:00 committed by Gitea
commit 1612fb440e
2 changed files with 90 additions and 0 deletions

View File

@ -35,3 +35,76 @@ volumes:
- name: android
host:
path: /home/drone/Android/Sdk
trigger:
event:
exclude:
- tag
---
kind: pipeline
type: docker
name: release
steps:
- name: build
image: nextcloudci/android:android-49
volumes:
- name: gradle
path: /root/.gradle
- name: android
path: /opt/android-sdk-linux
- name: tmp
path: /drone/src/out
commands:
- ./gradlew build
- ./gradlew :wrapper:fatJar
- mv /drone/src/wrapper/build/libs/*.jar /drone/src/out/
- mv /drone/src/app/build/outputs/apk/release/*.apk /drone/src/out/
- name: gitea release
image: plugins/gitea-release
volumes:
- name: tmp
path: /drone/src/out
settings:
api_key:
from_secret: gitea_release
base_url: https://git.norangeb.it
title: wedroid
files:
- /drone/src/out/*.jar
- /drone/src/out/*.apk
checksum:
- md5
- sha256
- name: notify
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_token
to:
from_secret: telegram_user
format: markdown
message: |
{{#success build.status}}
Release-{{build.tag}} successfully released.
{{else}}
Build [#{{build.number}}]({{build.link}}) from commit [{{truncate commit.sha 10}}]({{commit.link}}) with tag {{build.tag}} **failed**.
{{uppercasefirst commit.author}} please fix me!
{{/success}}
volumes:
- name: tmp
temp: {}
- name: gradle
host:
path: /home/drone/.gradle
- name: android
host:
path: /home/drone/Android/Sdk
trigger:
event:
- tag

View File

@ -14,3 +14,20 @@ dependencies {
// use JUnit test framework
testImplementation("junit:junit:4.12")
}
tasks{
register<Jar>("fatJar") {
archiveClassifier.set("fat")
from(
configurations.compileClasspath
.map { config ->
config.map { if (it.isDirectory) it else zipTree(it) }
}
)
manifest {
attributes("Implementation-Title" to "wedroid-wrapper")
}
}
}