Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ktlint formatering med unntak av trailing commas og max line length #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = false
ij_kotlin_allow_trailing_comma_on_call_site = false
max_line_length=99999
23 changes: 12 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ allprojects {
withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

}
}

subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin="java-library")
apply(plugin="java-test-fixtures")
apply(plugin = "java-library")
apply(plugin = "java-test-fixtures")

tasks {
withType<Test> {
Expand Down Expand Up @@ -91,14 +90,17 @@ tasks.create("tegn_modul_graf") {
}
}

fun hentPrinter() = if (ext.properties["utputt"] != null) {
val paff = "${project.rootDir.absolutePath}/doc/${ext.properties["utputt"]}"
val fail = File(paff)
if (!fail.exists()) {
fail.createNewFile()
fun hentPrinter() =
if (ext.properties["utputt"] != null) {
val paff = "${project.rootDir.absolutePath}/doc/${ext.properties["utputt"]}"
val fail = File(paff)
if (!fail.exists()) {
fail.createNewFile()
}
fail.printWriter()
} else {
PrintWriter(System.out, true)
}
fail.printWriter()
} else PrintWriter(System.out, true)

fun Project.listUtModulAvhengigheter(printer: PrintWriter) {
val deps = mutableSetOf<String>()
Expand All @@ -115,4 +117,3 @@ fun Project.listUtModulAvhengigheter(printer: PrintWriter) {
deps.forEach { printer.println("\t${this.name}-->$it") }
}
}

23 changes: 13 additions & 10 deletions jobs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,28 @@ dependencies {
}

tasks {
val copyJars = create("copy-jars") {
doLast {
configurations.runtimeClasspath.get().forEach {
val file = File("${layout.buildDirectory.get()}/libs/${it.name}")
if (!file.exists())
it.copyTo(file)
val copyJars =
create("copy-jars") {
doLast {
configurations.runtimeClasspath.get().forEach {
val file = File("${layout.buildDirectory.get()}/libs/${it.name}")
if (!file.exists()) {
it.copyTo(file)
}
}
}
}
}
get("build").finalizedBy(copyJars)

withType<Jar> {
archiveBaseName.set("app")

manifest {
attributes["Main-Class"] = mainClass
attributes["Class-Path"] = configurations.runtimeClasspath.get().joinToString(separator = " ") {
it.name
}
attributes["Class-Path"] =
configurations.runtimeClasspath.get().joinToString(separator = " ") {
it.name
}
}
}
}
Loading