File tree Expand file tree Collapse file tree 6 files changed +15
-19
lines changed
plugins/src/main/kotlin/com/saveourtool/diktat/buildutils Expand file tree Collapse file tree 6 files changed +15
-19
lines changed Original file line number Diff line number Diff line change 56
56
mv gradle/libs.versions.toml gradle/libs.versions.toml_current
57
57
mv build/diktat-snapshot/libs.versions.toml gradle/libs.versions.toml
58
58
59
- mv gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.kts gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.kts_current
60
- mv build/diktat-snapshot/diktat-convention-configuration.gradle.kts gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.kts
61
-
62
59
# copied from .github/workflows/diktat.yml
63
60
- uses : gradle/gradle-build-action@v2
64
61
with :
Original file line number Diff line number Diff line change 50
50
publishToSonatype
51
51
closeAndReleaseSonatypeStagingRepository
52
52
53
+ - name : ' Publish a release to Gradle Plugins'
54
+ id : publish-sonatype
55
+ uses : gradle/gradle-build-action@v2
56
+ with :
57
+ gradle-version : wrapper
58
+ arguments : |
59
+ :diktat-gradle-plugin:publishPlugins
60
+ -Pgradle.publish.key=${{ secrets.GRADLE_KEY }}
61
+ -Pgradle.publish.secret=${{ secrets.GRADLE_SECRET }}
62
+
53
63
github_release :
54
64
needs : release
55
65
name : ' Github Release'
Original file line number Diff line number Diff line change @@ -42,10 +42,8 @@ tasks.create("generateLibsForDiktatSnapshot") {
42
42
dependsOn(dependencies.map { " ${it.path} :publishToMavenLocal" })
43
43
44
44
val libsFile = rootProject.file(" gradle/libs.versions.toml" )
45
- val diktatGradleFile = rootProject.file(" gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.kts" )
46
45
47
46
inputs.file(libsFile)
48
- inputs.file(diktatGradleFile)
49
47
inputs.files(dependencies.map { it.pomFile() })
50
48
inputs.files(dependencies.map { it.artifactFile() })
51
49
inputs.property(" project-version" , version.toString())
@@ -68,18 +66,6 @@ tasks.create("generateLibsForDiktatSnapshot") {
68
66
Files .write(libsFileForDiktatSnapshot.toPath(), it)
69
67
}
70
68
71
- Files .readAllLines(diktatGradleFile.toPath())
72
- .map { line ->
73
- when {
74
- line.contains(" com.saveourtool.diktat.diktat-gradle-plugin" ) -> line.replace(" com.saveourtool.diktat.diktat-gradle-plugin" , " com.saveourtool.diktat" )
75
- else -> line
76
- }
77
- }
78
- .let {
79
- val diktatGradleFileForDiktatSnapshot = dir.resolve(" diktat-convention-configuration.gradle.kts" )
80
- Files .write(diktatGradleFileForDiktatSnapshot.toPath(), it)
81
- }
82
-
83
69
dependencies.forEach { dependency ->
84
70
val artifactDir = dir.pathToMavenArtifact(dependency)
85
71
.also { it.createDirectory() }
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ gradlePlugin {
44
44
plugins {
45
45
create(" diktatPlugin" ) {
46
46
id = " com.saveourtool.diktat"
47
+ displayName = " Static code analysis for Kotlin"
48
+ description = " Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs"
49
+ tags = listOf (" kotlin" , " code-analysis" )
47
50
implementationClass = " com.saveourtool.diktat.plugin.gradle.DiktatGradlePlugin"
48
51
}
49
52
}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ gradle-shadow = "8.1.1"
35
35
jetbrains-annotations = " 24.0.1"
36
36
kotlinx-coroutines = " 1.7.3"
37
37
assertj = " 3.24.2"
38
- diktat = " 1.3 .0-SNAPSHOT "
38
+ diktat = " 2.0 .0-rc.6 "
39
39
reckon = " 0.18.1"
40
40
spotless = " 6.22.0"
41
41
download = " 5.5.0"
Original file line number Diff line number Diff line change 1
1
package com.saveourtool.diktat.buildutils
2
2
3
3
plugins {
4
- id(" com.saveourtool.diktat.diktat-gradle-plugin " )
4
+ id(" com.saveourtool.diktat" )
5
5
}
6
6
7
7
diktat {
You can’t perform that action at this time.
0 commit comments