Kotlin 1.8.20 (#89)
* kotlin 1.8.2 * also lint build scripts * rename irUtils => IrUtils to make ktlint happy * fix sample: ./gradlew kotlinUpgradeYarnLock
This commit is contained in:
+3
-3
@@ -1,9 +1,9 @@
|
||||
plugins {
|
||||
kotlin("jvm") version "1.7.0" apply false
|
||||
id("org.jetbrains.dokka") version "1.7.0" apply false
|
||||
kotlin("jvm") version "1.8.20" apply false
|
||||
id("org.jetbrains.dokka") version "1.8.10" apply false
|
||||
id("com.gradle.plugin-publish") version "1.1.0" apply false
|
||||
id("com.github.gmazzo.buildconfig") version "3.1.0" apply false
|
||||
// id("org.jmailen.kotlinter") version "3.14.0" apply false
|
||||
id("org.jmailen.kotlinter") version "3.14.0" apply false
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import org.jmailen.gradle.kotlinter.tasks.FormatTask
|
||||
import org.jmailen.gradle.kotlinter.tasks.LintTask
|
||||
|
||||
plugins {
|
||||
id("java-gradle-plugin")
|
||||
kotlin("jvm")
|
||||
id("com.gradle.plugin-publish")
|
||||
id("com.github.gmazzo.buildconfig")
|
||||
// id("org.jmailen.kotlinter")
|
||||
id("org.jmailen.kotlinter")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -34,6 +36,10 @@ gradlePlugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.8"
|
||||
targetCompatibility = "1.8"
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
@@ -51,3 +57,14 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.register<FormatTask>("formatBuildscripts") {
|
||||
group = "verification"
|
||||
source(layout.projectDirectory.asFileTree.matching { include("**.kts") })
|
||||
}
|
||||
tasks.register<LintTask>("lintBuildscripts") {
|
||||
group = "verification"
|
||||
source(layout.projectDirectory.asFileTree.matching { include("**.kts") })
|
||||
}
|
||||
|
||||
tasks.named("lintKotlin") { dependsOn("lintBuildscripts") }
|
||||
tasks.named("formatKotlin") { dependsOn("formatBuildscripts") }
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import org.jmailen.gradle.kotlinter.tasks.FormatTask
|
||||
import org.jmailen.gradle.kotlinter.tasks.LintTask
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
@@ -7,7 +9,7 @@ plugins {
|
||||
|
||||
signing
|
||||
`maven-publish`
|
||||
// id("org.jmailen.kotlinter")
|
||||
id("org.jmailen.kotlinter")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -18,12 +20,17 @@ dependencies {
|
||||
|
||||
testImplementation(kotlin("test-junit5"))
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-compiler-embeddable")
|
||||
testImplementation("com.github.tschuchortdev:kotlin-compile-testing:1.4.9")
|
||||
testImplementation("com.github.tschuchortdev:kotlin-compile-testing:1.5.0")
|
||||
testImplementation(enforcedPlatform("org.junit:junit-bom:5.9.1"))
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
kotlinOptions.freeCompilerArgs = listOf("-opt-in=org.jetbrains.kotlin.backend.common.extensions.FirIncompatiblePluginAPI", "-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi")
|
||||
}
|
||||
tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.8"
|
||||
targetCompatibility = "1.8"
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
@@ -110,3 +117,14 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.register<FormatTask>("formatBuildscripts") {
|
||||
group = "verification"
|
||||
source(layout.projectDirectory.asFileTree.matching { include("**.kts") })
|
||||
}
|
||||
tasks.register<LintTask>("lintBuildscripts") {
|
||||
group = "verification"
|
||||
source(layout.projectDirectory.asFileTree.matching { include("**.kts") })
|
||||
}
|
||||
|
||||
tasks.named("lintKotlin") { dependsOn("lintBuildscripts") }
|
||||
tasks.named("formatKotlin") { dependsOn("formatBuildscripts") }
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ private val DEFAULT_COMPONENT_REGISTRARS = arrayOf(
|
||||
|
||||
fun compile(
|
||||
list: List<SourceFile>,
|
||||
vararg plugins: ComponentRegistrar = DEFAULT_COMPONENT_REGISTRARS,
|
||||
vararg componentRegistrars: ComponentRegistrar = DEFAULT_COMPONENT_REGISTRARS,
|
||||
): KotlinCompilation.Result {
|
||||
return KotlinCompilation().apply {
|
||||
sources = list
|
||||
@@ -46,7 +46,7 @@ fun compile(
|
||||
// black hole all writes
|
||||
}
|
||||
}
|
||||
compilerPlugins = plugins.toList()
|
||||
this.componentRegistrars = componentRegistrars.toList()
|
||||
inheritClassPath = true
|
||||
}.compile()
|
||||
}
|
||||
+501
-204
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user