Skip to content

Commit

Permalink
chore(build): Fix warning for unaligned target compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
nstdio committed Mar 31, 2022
1 parent 5ca12e0 commit 8b743c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl`
}
Expand All @@ -32,8 +30,6 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20-RC2")
}

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
kotlinDslPluginOptions {
jvmTarget.set(provider { java.targetCompatibility.toString() })
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ plugins {
group = "io.github.nstdio"

java {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11

withJavadocJar()
withSourcesJar()
}
Expand All @@ -49,9 +52,6 @@ dependencies {
}

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

options.encoding = "UTF-8"
options.compilerArgs = listOf("-Xlint:all", "-Xlint:-deprecation")
}

0 comments on commit 8b743c3

Please sign in to comment.