Skip to content

Commit

Permalink
Gradle script tweaks (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikc5000 authored Nov 24, 2020
1 parent f2caac8 commit 5e3afde
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
23 changes: 0 additions & 23 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.dokka.gradle.DokkaTask

buildscript {
Expand All @@ -14,26 +11,6 @@ buildscript {
}

subprojects {
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-XXLanguage:+InlineClasses")
jvmTarget = "1.8"
}
}

tasks.withType(AbstractTestTask::class).configureEach {
testLogging {
events = setOf(TestLogEvent.FAILED)
exceptionFormat = TestExceptionFormat.FULL
showStackTraces = true
}
}

tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets {
configureEach {
Expand Down
23 changes: 23 additions & 0 deletions buildSrc/src/main/kotlin/published-library.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
id("org.jetbrains.dokka")
Expand Down Expand Up @@ -101,3 +104,23 @@ publishing {
}
}
}

tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-XXLanguage:+InlineClasses")
jvmTarget = "1.8"
}
}

tasks.withType(AbstractTestTask::class).configureEach {
testLogging {
events = setOf(TestLogEvent.FAILED)
exceptionFormat = TestExceptionFormat.FULL
showStackTraces = true
}
}
2 changes: 1 addition & 1 deletion tools/code-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies {
}

application {
mainClassName = "io.islandtime.codegen.MainKt"
mainClass.set("io.islandtime.codegen.MainKt")
}

tasks.withType<KotlinCompile>().configureEach {
Expand Down

0 comments on commit 5e3afde

Please sign in to comment.