Fix packages and mage build

This commit is contained in:
Ryan Harg 2024-07-29 21:49:57 +02:00
parent 957dd5ccaa
commit ab419b2d2f
4 changed files with 7 additions and 8 deletions

View file

@ -1,4 +1,4 @@
package de.rpr.terminenbg
package de.rpr.githubreleases
import com.google.gson.*
import java.lang.reflect.Type
@ -15,7 +15,7 @@ class LocalDateAdapter : JsonSerializer<LocalDate?>, JsonDeserializer<LocalDate?
}
override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): LocalDate? {
return LocalDate.parse(json?.asString, formatter)
return json?.asString?.let { LocalDate.parse(it, formatter) }
}
}

View file

@ -1,8 +1,7 @@
package de.rpr.terminenbg
package de.rpr.githubreleases
import com.google.gson.*
import java.lang.reflect.Type
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
@ -18,7 +17,7 @@ class LocalDateTimeAdapter : JsonSerializer<LocalDateTime?>, JsonDeserializer<Lo
}
override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): LocalDateTime? {
return LocalDateTime.parse(json?.asString, formatter)
return json?.asString?.let { LocalDateTime.parse(it, formatter) }
}
}

View file

@ -7,8 +7,8 @@ import de.rpr.githubreleases.model.GithubRepo
import de.rpr.githubreleases.model.Release
import de.rpr.githubreleases.model.Releases
import de.rpr.githubreleases.model.asCollection
import de.rpr.terminenbg.LocalDateAdapter
import de.rpr.terminenbg.LocalDateTimeAdapter
import de.rpr.githubreleases.LocalDateAdapter
import de.rpr.githubreleases.LocalDateTimeAdapter
import java.io.File
import java.nio.file.Files
import java.time.LocalDate

View file

@ -11,7 +11,7 @@ const app = "github-release-bot"
// Build builds and exports the application as a docker image tar file.
func Build() error {
return sh.RunV("./gradlew", "build", "jibBuildTar")
return sh.RunV("./gradlew", "clean", "build", "jibBuildTar")
}
// Deploy deploys the application to a specified host via scp.