Skip to content

Commit

Permalink
remove formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhauck committed Nov 6, 2023
1 parent b2d96c9 commit 9244a85
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions plugin-build/plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ java {
targetCompatibility = JavaVersion.VERSION_11
}

tasks.withType<KotlinCompile> { kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } }
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}

/**
* We create a configuration that we can resolve by extending [compileOnly]. Here we inject the
* dependencies into TestKit plugin classpath via [PluginUnderTestMetadata] to make them available
* for testing.
* We create a configuration that we can resolve by extending [compileOnly].
* Here we inject the dependencies into TestKit plugin
* classpath via [PluginUnderTestMetadata] to make them available for testing.
*/
val integrationTestRuntime: Configuration by configurations.creating

integrationTestRuntime.apply {
extendsFrom(configurations.getByName("compileOnly"))
attributes {
Expand Down Expand Up @@ -63,11 +66,8 @@ dependencies {

testRuntimeOnly(
files(
serviceOf<ModuleRegistry>()
.getModule("gradle-tooling-api-builders")
.classpath
.asFiles
.first()
serviceOf<ModuleRegistry>().getModule("gradle-tooling-api-builders")
.classpath.asFiles.first()
)
)
}
Expand Down Expand Up @@ -96,15 +96,20 @@ signing {

tasks.withType<Sign>().configureEach { onlyIf { project.properties["skip-signing"] != "true" } }

tasks.withType<Test> { useJUnitPlatform() }
tasks.withType<Test> {
useJUnitPlatform()
}

val persistKtmftVersion by
tasks.registering {
inputs.property("ktfmtVersion", libs.ktfmt)
outputs.files(layout.buildDirectory.file("ktfmt-version.txt"))
doLast { outputs.files.singleFile.writeText(inputs.properties["ktfmtVersion"].toString()) }
val persistKtmftVersion by tasks.registering {
inputs.property("ktfmtVersion", libs.ktfmt)
outputs.files(layout.buildDirectory.file("ktfmt-version.txt"))
doLast {
outputs.files.singleFile.writeText(inputs.properties["ktfmtVersion"].toString())
}
}

tasks.named<ProcessResources>("processResources") {
from(persistKtmftVersion) { into("com/ncorti/ktfmt/gradle") }
from(persistKtmftVersion) {
into("com/ncorti/ktfmt/gradle")
}
}

0 comments on commit 9244a85

Please sign in to comment.