Add Gitignore File

This commit is contained in:
Oliver Rümpelein 2021-03-06 19:38:37 +01:00
parent f3944d01d3
commit 9f17e88ce3
2 changed files with 44 additions and 5 deletions

30
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,30 @@
# Based on https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Gradle.gitlab-ci.yml
image: gradle:jdk11
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
build:
stage: build
script: gradle --build-cache assemble
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
artifact:
stage: deploy
script: gradle publish
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull-push
paths:
- build
- .gradle

View File

@ -68,12 +68,21 @@ tasks {
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group as String
artifactId = project.name
version = project.version as String
create<MavenPublication>("QueryBuilder") {
from(components["java"])
}
repositories {
maven {
url = uri("https://git.f3l.de/api/v4/projects/180/packages/maven")
name = "GitLab"
credentials(HttpHeaderCredentials::class.java) {
name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
}
}