Skip to content

Commit

Permalink
Fixed debug mode in gradle plugin (#546)
Browse files Browse the repository at this point in the history
### What's done:
* Hotfix for gradle plugin
* Updated pom.xml
* Updated README.md
* Updated metrics_for_master.yml
  • Loading branch information
petertrr authored Nov 18, 2020
1 parent 44c9930 commit 73a96ea
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/metrics_for_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-build-
- name: Run tests
run: mvn -B test
run: mvn -B test -DskipPluginMarker
- name: Generate code coverage report
uses: codecov/codecov-action@v1
with:
Expand Down
5 changes: 1 addition & 4 deletions diktat-gradle-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ To avoid versions duplication, diktat and ktlint versions are passed to gradle v
These versions are then written in a file and then included in the plugin jar to determine dependencies for JavaExec.

Gradle plugin marker pom, which is normally produced by `java-gradle-plugin` plugin during gradle build,
is added manually as a maven module.

Build is skipped by default on windows to make things easier; if you want to build it, you should change
the property `gradle.executable` to `gradlew.bat` and the property `skip.gradle.build` to `true`.
is added manually as a maven module.
1 change: 0 additions & 1 deletion diktat-gradle-plugin/gradle-plugin-marker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<groupId>org.cqfn.diktat.diktat-gradle-plugin</groupId>
<artifactId>org.cqfn.diktat.diktat-gradle-plugin.gradle.plugin</artifactId>
<packaging>pom</packaging>
<version>0.1.5-SNAPSHOT</version>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion diktat-gradle-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
</os>
</activation>
<properties>
<skip.gradle.build>true</skip.gradle.build>
<gradle.executable>${project.basedir}/gradlew.bat</gradle.executable>
</properties>
</profile>
</profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ open class DiktatJavaExecTaskBase @Inject constructor(
logger.lifecycle("Running diktat $DIKTAT_VERSION with ktlint $KTLINT_VERSION")
}
args = additionalFlags.toMutableList().apply {
add(if (diktatExtension.debug) "--debug" else "")
if (diktatExtension.debug) {
add("--debug")
}
add(diktatExtension.inputs.files.joinToString { it.path })
}
}
Expand Down

0 comments on commit 73a96ea

Please sign in to comment.