Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-logic-commons/gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ dependencies {

implementation("org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:2.3.3")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
implementation("org.gradle.kotlin:gradle-kotlin-dsl-conventions:0.7.0")
implementation("org.gradle.kotlin:gradle-kotlin-dsl-conventions:0.8.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ktlint {

tasks.runKtlintCheckOverKotlinScripts {
// Only check the build files, not all *.kts files in the project
setIncludes(listOf("*.gradle.kts"))
includes += listOf("*.gradle.kts")
}

tasks.named("codeQuality") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ plugins {
id("org.gradle.kotlin-dsl.ktlint-convention")
}

ktlint {
version.set("0.41.0")
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed anymore as we can now use the default version

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ val unsupportedTasksPredicate: (Task) -> Boolean = { task: Task ->
task.name in listOf(
"updateInitPluginTemplateVersionFile",
"resolveAllDependencies",
"quickCheck",
) -> true
task.name.endsWith("Wrapper") -> true
task.name in listOf("docs", "stageDocs", "docsTest", "serveDocs") -> true
Expand Down
4 changes: 2 additions & 2 deletions build-logic/build-platform/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ dependencies {
api("org.gradle:test-retry-gradle-plugin:1.4.0")
api("org.jetbrains.kotlin:kotlin-gradle-plugin") { version { strictly(kotlinVersion) } }
api(kotlin("compiler-embeddable")) { version { strictly(kotlinVersion) } }
api("org.jlleitschuh.gradle:ktlint-gradle:10.1.0")
api("org.gradle.kotlin:gradle-kotlin-dsl-conventions:0.7.0")
api("org.jlleitschuh.gradle:ktlint-gradle:10.3.0")
api("org.gradle.kotlin:gradle-kotlin-dsl-conventions:0.8.0")
api("com.autonomousapps:dependency-analysis-gradle-plugin:0.71.0")

// Java Libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ enum class Check(private val extension: String) {
}

project.javaexec {
mainClass.set("com.github.shyiko.ktlint.Main")
mainClass.set("com.pinterest.ktlint.Main")
nonTeamCityKtFiles.forEach { args(it) }
args("--reporter=plain")
args("--color")
Expand All @@ -140,8 +140,8 @@ enum class Check(private val extension: String) {

override fun addDependencies(project: Project) {
project.dependencies.add("quickCheck", project.files(project.gradleKotlinDslKtlintRulesetJar()))
project.dependencies.add("quickCheck", "com.github.shyiko:ktlint:0.30.0") {
exclude(group = "com.github.shyiko.ktlint", module = "ktlint-ruleset-standard")
project.dependencies.add("quickCheck", "com.pinterest.ktlint:ktlint:0.45.2") {
exclude(group = "com.pinterest.ktlint", module = "ktlint-ruleset-standard")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,48 +65,52 @@ abstract class AnnotationGeneratorWorkAction : WorkAction<AnnotationGeneratorWor
@Suppress("UnnecessaryVariable")
@Language("groovy")
val annotationBody = """
/*
* Copyright 2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package $packageName;

import org.intellij.lang.annotations.Language;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;

@Retention(RetentionPolicy.CLASS)
@Target([METHOD, FIELD, PARAMETER, LOCAL_VARIABLE, ANNOTATION_TYPE])
@Language(value = "groovy", prefix = '''
${groovyImports()}

${groovyProjectAccessors()}
''')
@interface GroovyBuildScriptLanguage {}
""".trimMargin() + '\n'
|/*
| * Copyright 2020 the original author or authors.
| *
| * Licensed under the Apache License, Version 2.0 (the "License");
| * you may not use this file except in compliance with the License.
| * You may obtain a copy of the License at
| *
| * http://www.apache.org/licenses/LICENSE-2.0
| *
| * Unless required by applicable law or agreed to in writing, software
| * distributed under the License is distributed on an "AS IS" BASIS,
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| * See the License for the specific language governing permissions and
| * limitations under the License.
| */
|
|package $packageName
|
|import org.intellij.lang.annotations.Language
|
|import java.lang.annotation.Retention
|import java.lang.annotation.RetentionPolicy
|import java.lang.annotation.Target
|
|import static java.lang.annotation.ElementType.ANNOTATION_TYPE
|import static java.lang.annotation.ElementType.FIELD
|import static java.lang.annotation.ElementType.LOCAL_VARIABLE
|import static java.lang.annotation.ElementType.METHOD
|import static java.lang.annotation.ElementType.PARAMETER
|
|@Retention(RetentionPolicy.CLASS)
|@Target([METHOD, FIELD, PARAMETER, LOCAL_VARIABLE, ANNOTATION_TYPE])
|@Language(value = "groovy", prefix = '''
|${groovyImports().withTrimmableMargin()}
|
|${groovyProjectAccessors().withTrimmableMargin()}
|''')
|@interface GroovyBuildScriptLanguage {}
|""".trimMargin() + '\n'
return annotationBody
}

private
fun String.withTrimmableMargin(): String =
lines().joinToString(separator = "\n |")

private
fun groovyImports(): String {
val imports: List<String> =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tasks {

runKtlintCheckOverKotlinScripts {
// Only check the build files, not all *.kts files in the project
setIncludes(listOf("*.gradle.kts"))
includes += listOf("*.gradle.kts")
}

withType<Test>().configureEach {
Expand Down
45 changes: 19 additions & 26 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<ignored-key id="8f7f6c0451967b84" reason="Key couldn't be downloaded from any key server"/>
<ignored-key id="13bb90ce8eafbe37" reason="Key couldn't be downloaded from any key server"/>
<ignored-key id="5dfb46c505b694fe" reason="Key couldn't be downloaded from any key server"/>
<ignored-key id="36d4e9618f3adab5" reason="Key couldn't be downloaded from any key server"/>
<ignored-key id="02216ed811210daa" reason="Key couldn't be downloaded from any key server"/>
</ignored-keys>
<trusted-keys>
<trusted-key id="019082bc00e0324e2aef4cf00d3b328562a119a7" group="org.openjdk.jmh"/>
Expand Down Expand Up @@ -113,6 +115,7 @@
<trusting group="org.codehaus.plexus"/>
</trusted-key>
<trusted-key id="475f3b8e59e6e63aa78067482c7b12f2a511e325">
<trusting group="ch.qos.logback"/>
<trusting group="org.slf4j"/>
<trusting group="org.slf4j" name="slf4j-api"/>
</trusted-key>
Expand Down Expand Up @@ -767,11 +770,21 @@
<pgp value="c328250fe23a2420814521ec0eb69f76fd171538"/>
</artifact>
</component>
<component group="io.github.detekt.sarif4k" name="sarif4k" version="0.0.1">
<artifact name="sarif4k-0.0.1.jar">
<sha256 value="41ec72cf2521783224581c76aaa7e97d4a50f396a66d642500ff4777b395a376" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="io.github.gradle" name="gradle-enterprise-conventions-plugin" version="0.7.6">
<artifact name="gradle-enterprise-conventions-plugin-0.7.6.jar">
<sha256 value="b3ff4bba6c5ac6e50e7225c7d1f69c0a9bc2ae9f3ce2bfacdc3f1b3999c2e758" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="io.github.microutils" name="kotlin-logging-jvm" version="2.1.21">
<artifact name="kotlin-logging-jvm-2.1.21.jar">
<sha256 value="7b15ccb488261de2a77004f13b2d4a00c92d1bbbb2ad79efb9b6c2e56c5a7ae6" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="io.netty" name="netty-all" version="4.1.63.Final">
<artifact name="netty-all-4.1.63.Final.jar">
<pgp value="7e22d50a7ebd9d2cd269b2d4056aca74d46000bf"/>
Expand Down Expand Up @@ -1259,9 +1272,9 @@
<sha256 value="4c872e5eef4a35fc46dc78a4854b0442261705ce3bfe4a4a900847bd38a2886c" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="org.gradle.kotlin" name="gradle-kotlin-dsl-conventions" version="0.7.0">
<artifact name="gradle-kotlin-dsl-conventions-0.7.0.jar">
<sha256 value="4df958e608da9320829fa338ea5943eac30904d304e25b7e7e9d502853fe54a6" origin="Artifact is not signed"/>
<component group="org.gradle.kotlin" name="gradle-kotlin-dsl-conventions" version="0.8.0">
<artifact name="gradle-kotlin-dsl-conventions-0.8.0.jar">
<sha256 value="b4182982109d85f9a623fa597932c3f09651467559bb99965c41d45159e89a68" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="org.gradle.kotlin" name="gradle-kotlin-dsl-plugins" version="2.3.3">
Expand Down Expand Up @@ -1304,29 +1317,9 @@
<sha256 value="4ec93d0516066b0b648ba987c6d3d65f6fb067dc0bbba95c1ece61e0428488e5" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="org.jlleitschuh.gradle" name="ktlint-gradle" version="10.0.0">
<artifact name="ktlint-gradle-10.0.0.jar">
<sha256 value="3e8f3cfa1b16a506f56201fad46f88d1b8ab3334ce4736c70f1de04e7f1cb1e8" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="org.jlleitschuh.gradle" name="ktlint-gradle" version="10.1.0">
<artifact name="ktlint-gradle-10.1.0.jar">
<sha256 value="485a286f85e555792d6a560b0d2de2b1854d61fd1b0c76b6b95018bffcc63ea6" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="org.jlleitschuh.gradle" name="ktlint-gradle" version="8.2.0">
<artifact name="ktlint-gradle-8.2.0.jar">
<sha256 value="a0b8a2ea760667678076ddbf6cc51e45d17a152b8c32ff884ee0f4e0b10e5b55" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="org.jlleitschuh.gradle" name="ktlint-gradle" version="9.2.1">
<artifact name="ktlint-gradle-9.2.1.jar">
<sha256 value="e7aa262f9df6ac1bad22b0c08609581af8b94dff90beef388648c9da47cba5e8" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="org.jlleitschuh.gradle" name="ktlint-gradle" version="9.4.0">
<artifact name="ktlint-gradle-9.4.0.jar">
<sha256 value="396fb7bd7dc2544eeab30d4922c2aac9149f16bcfed7f5db97cb91e37fd71286" origin="Artifact is not signed"/>
<component group="org.jlleitschuh.gradle" name="ktlint-gradle" version="10.3.0">
<artifact name="ktlint-gradle-10.3.0.jar">
<sha256 value="6923398b3a77a1fb3722aacbcdde6ab0527cfcc98eb3fef6974074f96ae7fe76" origin="Artifact is not signed"/>
</artifact>
</component>
<component group="org.jruby.jcodings" name="jcodings" version="1.0.46">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PrecompiledScriptPluginIntegrationTest : AbstractPluginIntegrationTest() {
"""
plugins {
`kotlin-dsl`
id("org.gradle.kotlin-dsl.ktlint-convention") version "0.7.0"
id("org.gradle.kotlin-dsl.ktlint-convention") version "0.8.0"
}

$repositoriesBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ abstract class AbstractSmokeTest extends Specification {
static node = Versions.of("1.3.1")

// https://plugins.gradle.org/plugin/org.jlleitschuh.gradle.ktlint
static ktlint = Versions.of("10.2.0")
static ktlint = Versions.of("10.3.0")

// https://plugins.gradle.org/plugin/com.github.node-gradle.node
static newNode = Versions.of("3.1.1")
Expand Down