Skip to content

Commit 73a96ea

Browse files
authored
Fixed debug mode in gradle plugin (#546)
### What's done: * Hotfix for gradle plugin * Updated pom.xml * Updated README.md * Updated metrics_for_master.yml
1 parent 44c9930 commit 73a96ea

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

.github/workflows/metrics_for_master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
restore-keys: |
2626
${{ runner.os }}-maven-build-
2727
- name: Run tests
28-
run: mvn -B test
28+
run: mvn -B test -DskipPluginMarker
2929
- name: Generate code coverage report
3030
uses: codecov/codecov-action@v1
3131
with:

diktat-gradle-plugin/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,4 @@ To avoid versions duplication, diktat and ktlint versions are passed to gradle v
66
These versions are then written in a file and then included in the plugin jar to determine dependencies for JavaExec.
77

88
Gradle plugin marker pom, which is normally produced by `java-gradle-plugin` plugin during gradle build,
9-
is added manually as a maven module.
10-
11-
Build is skipped by default on windows to make things easier; if you want to build it, you should change
12-
the property `gradle.executable` to `gradlew.bat` and the property `skip.gradle.build` to `true`.
9+
is added manually as a maven module.

diktat-gradle-plugin/gradle-plugin-marker/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<groupId>org.cqfn.diktat.diktat-gradle-plugin</groupId>
1212
<artifactId>org.cqfn.diktat.diktat-gradle-plugin.gradle.plugin</artifactId>
1313
<packaging>pom</packaging>
14-
<version>0.1.5-SNAPSHOT</version>
1514

1615
<dependencies>
1716
<dependency>

diktat-gradle-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
</os>
162162
</activation>
163163
<properties>
164-
<skip.gradle.build>true</skip.gradle.build>
164+
<gradle.executable>${project.basedir}/gradlew.bat</gradle.executable>
165165
</properties>
166166
</profile>
167167
</profiles>

diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ open class DiktatJavaExecTaskBase @Inject constructor(
4242
logger.lifecycle("Running diktat $DIKTAT_VERSION with ktlint $KTLINT_VERSION")
4343
}
4444
args = additionalFlags.toMutableList().apply {
45-
add(if (diktatExtension.debug) "--debug" else "")
45+
if (diktatExtension.debug) {
46+
add("--debug")
47+
}
4648
add(diktatExtension.inputs.files.joinToString { it.path })
4749
}
4850
}

0 commit comments

Comments
 (0)