Skip to content

Commit

Permalink
Added kotlinx-datetime to api
Browse files Browse the repository at this point in the history
  • Loading branch information
pcimcioch committed Jan 23, 2022
1 parent 508a6f3 commit 1394deb
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ Library is available in Central Maven Repository
<dependency>
<groupId>com.github.pcimcioch</groupId>
<artifactId>gitlab-ci-kotlin-dsl</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
</dependency>
```

```
implementation("com.github.pcimcioch:gitlab-ci-kotlin-dsl:1.3.0")
implementation("com.github.pcimcioch:gitlab-ci-kotlin-dsl:1.3.1")
```

# Documentation
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ plugins {
kotlin("plugin.serialization") version "1.5.31"
`maven-publish`
signing
id("org.jetbrains.dokka") version "1.6.10"
id("org.jetbrains.dokka") version "1.5.31"
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.1")
implementation("com.charleskorn.kaml:kaml:0.37.0")

api("org.jetbrains.kotlinx:kotlinx-datetime:0.3.1")

testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
testImplementation("org.assertj:assertj-core:3.22.0")
}
Expand Down
2 changes: 1 addition & 1 deletion examples/child-pipeline/gitlab-ci.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath("com.github.pcimcioch:gitlab-ci-kotlin-dsl:1.3.0")
classpath("com.github.pcimcioch:gitlab-ci-kotlin-dsl:1.3.1")
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/gradle-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
dependencies {
implementation(kotlin("stdlib-jdk8"))

implementation("com.github.pcimcioch:gitlab-ci-kotlin-dsl:1.3.0")
implementation("com.github.pcimcioch:gitlab-ci-kotlin-dsl:1.3.1")
}

application {
Expand Down
2 changes: 1 addition & 1 deletion examples/pure-gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath("com.github.pcimcioch:gitlab-ci-kotlin-dsl:1.3.0")
classpath("com.github.pcimcioch:gitlab-ci-kotlin-dsl:1.3.1")
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/pcimcioch/gitlabci/dsl/DslBase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ abstract class DslBase {
override val descriptor = PrimitiveSerialDescriptor("DslBase", PrimitiveKind.STRING)

override fun deserialize(decoder: Decoder): DslBase {
throw IllegalStateException(descriptor.serialName)
throw IllegalStateException("Deserialization is not supported for this DSL object")
}

override fun serialize(encoder: Encoder, value: DslBase) {
Expand Down
3 changes: 1 addition & 2 deletions src/main/kotlin/pcimcioch/gitlabci/dsl/include/IncludeDsl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class IncludeDsl : DslBase() {
private val includes = mutableListOf<IncludeDetailsDsl>()

fun local(local: String) = addAndReturn(includes, IncludeLocalDsl(local))
fun file(project: String, file: String, ref: String? = null) =
addAndReturn(includes, IncludeFileDsl(project, file, ref))
fun file(project: String, file: String, ref: String? = null) = addAndReturn(includes, IncludeFileDsl(project, file, ref))

fun template(template: String) = addAndReturn(includes, IncludeTemplateDsl(template))
fun remote(remote: String) = addAndReturn(includes, IncludeRemoteDsl(remote))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ open class StringRepresentationSerializer<T : StringRepresentation>(
}

override fun deserialize(decoder: Decoder): T {
throw IllegalStateException(descriptor.serialName)
throw IllegalStateException("Deserialization is not supported for this DSL object")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ open class TwoTypeSerializer<S: Any>(
}

override fun deserialize(decoder: Decoder): S {
throw IllegalStateException(descriptor.serialName)
throw IllegalStateException("Deserialization is not supported for this DSL object")
}

@Suppress("UNCHECKED_CAST")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ open class ValueSerializer<T, K>(
}

override fun deserialize(decoder: Decoder): T {
throw IllegalStateException(descriptor.serialName)
throw IllegalStateException("Deserialization is not supported for this DSL object")
}
}

0 comments on commit 1394deb

Please sign in to comment.