Add gitlab ci file.

This commit is contained in:
Oliver Rümpelein 2021-10-30 20:22:49 +02:00
parent e9e150de1a
commit 427f7b89fd
4 changed files with 48 additions and 9 deletions

28
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,28 @@
image: gradle:jdk11
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
build:
stage: build
script:
- gradle --build-cache assemble
- gradle --build-cache test
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

@ -2,10 +2,14 @@ import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinxSerializationVersion: String by project
val cliktVersion: String by project
val kotlinVersion: String by project
plugins {
kotlin("jvm") version "1.5.21"
kotlin("plugin.serialization") version "1.5.21"
id("org.jetbrains.compose") version "1.0.0-alpha3"
kotlin("jvm")
kotlin("plugin.serialization")
id("org.jetbrains.compose")
}
group = "de.pheerai"
@ -19,10 +23,10 @@ repositories {
dependencies {
implementation(compose.desktop.currentOs)
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-json", "1.2.2")
implementation("com.github.ajalt.clikt", "clikt-jvm", "3.2.0")
implementation("com.github.ajalt.clikt", "clikt", "3.2.0")
testImplementation(kotlin("test", "1.5.21"))
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-json", kotlinxSerializationVersion)
implementation("com.github.ajalt.clikt", "clikt-jvm", cliktVersion)
implementation("com.github.ajalt.clikt", "clikt", cliktVersion)
testImplementation("org.jetbrains.kotlin", "kotlin-test", kotlinVersion)
}
tasks.test {

View file

@ -1 +1,5 @@
kotlin.code.style=official
kotlinxSerializationVersion=1.2.2
cliktVersion=1.2.2
kotlinVersion=1.5.31

View file

@ -3,7 +3,10 @@ pluginManagement {
gradlePluginPortal()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
plugins {
kotlin("jvm") version "1.5.21"
kotlin("plugin.serialization") version "1.5.21"
id("org.jetbrains.compose") version "1.0.0-alpha3"
}
}
rootProject.name = "quiztable"