Add gitlab ci file.
This commit is contained in:
parent
e9e150de1a
commit
427f7b89fd
4 changed files with 48 additions and 9 deletions
28
.gitlab-ci.yml
Normal file
28
.gitlab-ci.yml
Normal 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
|
|
@ -2,10 +2,14 @@ import org.jetbrains.compose.compose
|
||||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
|
val kotlinxSerializationVersion: String by project
|
||||||
|
val cliktVersion: String by project
|
||||||
|
val kotlinVersion: String by project
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.5.21"
|
kotlin("jvm")
|
||||||
kotlin("plugin.serialization") version "1.5.21"
|
kotlin("plugin.serialization")
|
||||||
id("org.jetbrains.compose") version "1.0.0-alpha3"
|
id("org.jetbrains.compose")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "de.pheerai"
|
group = "de.pheerai"
|
||||||
|
@ -19,10 +23,10 @@ repositories {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(compose.desktop.currentOs)
|
implementation(compose.desktop.currentOs)
|
||||||
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-json", "1.2.2")
|
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-json", kotlinxSerializationVersion)
|
||||||
implementation("com.github.ajalt.clikt", "clikt-jvm", "3.2.0")
|
implementation("com.github.ajalt.clikt", "clikt-jvm", cliktVersion)
|
||||||
implementation("com.github.ajalt.clikt", "clikt", "3.2.0")
|
implementation("com.github.ajalt.clikt", "clikt", cliktVersion)
|
||||||
testImplementation(kotlin("test", "1.5.21"))
|
testImplementation("org.jetbrains.kotlin", "kotlin-test", kotlinVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
|
||||||
|
kotlinxSerializationVersion=1.2.2
|
||||||
|
cliktVersion=1.2.2
|
||||||
|
kotlinVersion=1.5.31
|
||||||
|
|
|
@ -3,7 +3,10 @@ pluginManagement {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
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"
|
rootProject.name = "quiztable"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue