-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new build script and stepping dependencies
- Loading branch information
1 parent
f744fa6
commit bdc7e4c
Showing
9 changed files
with
134 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: Call Gradle CI | ||
|
||
on: [workflow_dispatch, push, pull_request] | ||
|
||
jobs: | ||
call-workflow: | ||
uses: tomasbjerre/.github/.github/workflows/gradle-ci.yml@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# violations-gradle-plugin changelog | ||
|
||
Changelog of violations-gradle-plugin. | ||
|
||
## 2.1.2 (2024-09-29) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,9 @@ | ||
apply plugin: 'java-library' | ||
|
||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
dependencies { | ||
classpath 'se.bjurr.gradle:gradle-scripts:2.+' | ||
} | ||
plugins { | ||
id "se.bjurr.gradle.conventional-release" | ||
id "se.bjurr.gradle.java-convention" | ||
id "se.bjurr.gradle.update-versions" | ||
} | ||
project.ext.buildConfig = [ | ||
repoType: "GRADLE", | ||
gradlePlugin: [ | ||
tags: ['violation', 'static code analysis', 'Checkstyle', 'CPPLint', 'CPPCheck', 'CSSLint', 'Findbugs', 'Flake8', 'PyLint', 'Pep8', 'Mccabe', 'PyFlakes', 'JSHint', 'Lint', 'PerlCritic', 'PMD', 'ReSharper', 'XMLLint'], | ||
implementationClass: 'se.bjurr.violations.gradle.plugin.ViolationsGradlePlugin' | ||
], | ||
violations: [ | ||
updateReadme: true | ||
] | ||
] | ||
apply from: project.buildscript.classLoader.getResource('main.gradle').toURI() | ||
|
||
dependencies { | ||
implementation 'se.bjurr.violations:violations-git-lib:2.2.1' | ||
implementation 'se.bjurr.violations:violations-git-lib:2.3.2' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#Sun Sep 29 09:27:54 CEST 2024 | ||
description=Gradle that will find report files from static code analysis, present and optionally fail the build. | ||
version=2.1.2 | ||
description=Find report files from static code analysis, present and optionally fail the build. | ||
group=se.bjurr.violations | ||
implementationClass=se.bjurr.violations.gradle.plugin.ViolationsGradlePlugin | ||
repoType=GRADLE | ||
sourceCompatibility=11 | ||
tags=violation,static code analysis,Checkstyle,CPPLint,CPPCheck,CSSLint,Findbugs,Flake8,PyLint,Pep8,Mccabe,PyFlakes,JSHint,Lint,PerlCritic,PMD,ReSharper,XMLLint | ||
targetCompatibility=11 | ||
version=2.1.3 | ||
maxViolations=6 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
pluginManagement { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
plugins { | ||
id "se.bjurr.gradle.conventional-release" version "0.+" apply false | ||
id "se.bjurr.gradle.java-convention" version "0.+" apply false | ||
id "se.bjurr.gradle.update-versions" version "0.+" apply false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,96 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath "se.bjurr.violations:violations-gradle-plugin:+" | ||
} | ||
dependencies { | ||
classpath "se.bjurr.violations:violations-gradle-plugin:+" | ||
} | ||
} | ||
|
||
apply plugin: "java" | ||
apply plugin: "se.bjurr.violations.violations-gradle-plugin" | ||
|
||
task violations(type: se.bjurr.violations.gradle.plugin.ViolationsTask) { | ||
// | ||
// Optional config | ||
// | ||
maxReporterColumnWidth = 0 // 0 is disabled | ||
maxRuleColumnWidth = 10 | ||
maxSeverityColumnWidth = 0 | ||
maxLineColumnWidth = 0 | ||
maxMessageColumnWidth = 50 | ||
codeClimateFile = file('code-climate-file.json') // Will create a CodeClimate JSON report. | ||
violationsFile = file('violations-file.json') // Will create a normalized JSON report. | ||
// | ||
// Optional config | ||
// | ||
maxReporterColumnWidth = 0 // 0 is disabled | ||
maxRuleColumnWidth = 10 | ||
maxSeverityColumnWidth = 0 | ||
maxLineColumnWidth = 0 | ||
maxMessageColumnWidth = 50 | ||
codeClimateFile = file('code-climate-file.json') // Will create a CodeClimate JSON report. | ||
violationsFile = file('violations-file.json') // Will create a normalized JSON report. | ||
|
||
// | ||
// Global configuration, remove if you dont want to report violations for | ||
// the entire repo. | ||
// | ||
minSeverity = 'INFO' // INFO, WARN or ERROR | ||
detailLevel = 'VERBOSE' // PER_FILE_COMPACT, COMPACT or VERBOSE | ||
maxViolations = 99999999 // Will fail the build if total number of found violations is higher | ||
printViolations = true // Will print violations found in diff | ||
// | ||
// Global configuration, remove if you dont want to report violations for | ||
// the entire repo. | ||
// | ||
minSeverity = 'INFO' // INFO, WARN or ERROR | ||
detailLevel = 'VERBOSE' // PER_FILE_COMPACT, COMPACT or VERBOSE | ||
maxViolations = 99999999 // Will fail the build if total number of found violations is higher | ||
printViolations = true // Will print violations found in diff | ||
|
||
|
||
// | ||
// Diff configuration, remove if you dont want to report violations for | ||
// files changed between specific revisions. | ||
// | ||
// diff-properties can be supplied with something like: | ||
// | ||
// ./gradlew violations -i -PdiffFrom=e4de20e -PdiffTo=HEAD | ||
// | ||
// And in Travis, you could add: | ||
// | ||
// script: | ||
// - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./gradlew check -PdiffFrom=$TRAVIS_PULL_REQUEST_BRANCH -PdiffTo=$TRAVIS_BRANCH ; fi' | ||
// | ||
diffFrom = project.properties.diffFrom // Can be empty (ignored), Git-commit or any Git-reference | ||
diffTo = project.properties.diffTo // Same as above | ||
diffMinSeverity = 'INFO' // INFO, WARN or ERROR | ||
diffDetailLevel = 'VERBOSE' // PER_FILE_COMPACT, COMPACT or VERBOSE | ||
diffMaxViolations = 99 // Will fail the build if number of violations, in the diff within from/to, is higher | ||
diffPrintViolations = true // Will print violations found in diff | ||
gitRepo = file('.') // Where to look for Git | ||
// | ||
// Diff configuration, remove if you dont want to report violations for | ||
// files changed between specific revisions. | ||
// | ||
// diff-properties can be supplied with something like: | ||
// | ||
// ./gradlew violations -i -PdiffFrom=e4de20e -PdiffTo=HEAD | ||
// | ||
// And in Travis, you could add: | ||
// | ||
// script: | ||
// - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./gradlew check -PdiffFrom=$TRAVIS_PULL_REQUEST_BRANCH -PdiffTo=$TRAVIS_BRANCH ; fi' | ||
// | ||
diffFrom = project.properties.diffFrom // Can be empty (ignored), Git-commit or any Git-reference | ||
diffTo = project.properties.diffTo // Same as above | ||
diffMinSeverity = 'INFO' // INFO, WARN or ERROR | ||
diffDetailLevel = 'VERBOSE' // PER_FILE_COMPACT, COMPACT or VERBOSE | ||
diffMaxViolations = 99 // Will fail the build if number of violations, in the diff within from/to, is higher | ||
diffPrintViolations = true // Will print violations found in diff | ||
gitRepo = file('.') // Where to look for Git | ||
|
||
|
||
// | ||
// This is mandatory regardless of if you want to report violations between | ||
// revisions or the entire repo. | ||
// | ||
// Many more formats available, see: https://github.com/tomasbjerre/violations-lib | ||
violations = [ | ||
["FINDBUGS", projectDir.path, ".*/findbugs/.*\\.xml\$", "Findbugs"], | ||
["PMD", projectDir.path, ".*/pmd/.*\\.xml\$", "PMD"], | ||
["CHECKSTYLE", projectDir.path, ".*/checkstyle/.*\\.xml\$", "Checkstyle"], | ||
["JSLINT", projectDir.path, ".*/jshint/.*\\.xml\$", "JSHint"], | ||
["CSSLINT", projectDir.path, ".*/csslint/.*\\.xml\$", "CssLint"] | ||
] | ||
// | ||
// This is mandatory regardless of if you want to report violations between | ||
// revisions or the entire repo. | ||
// | ||
// Many more formats available, see: https://github.com/tomasbjerre/violations-lib | ||
violations = [ | ||
[ | ||
"FINDBUGS", | ||
projectDir.path, | ||
".*/findbugs/.*\\.xml\$", | ||
"Findbugs" | ||
], | ||
[ | ||
"PMD", | ||
projectDir.path, | ||
".*/pmd/.*\\.xml\$", | ||
"PMD" | ||
], | ||
[ | ||
"CHECKSTYLE", | ||
projectDir.path, | ||
".*/checkstyle/.*\\.xml\$", | ||
"Checkstyle" | ||
], | ||
[ | ||
"JSLINT", | ||
projectDir.path, | ||
".*/jshint/.*\\.xml\$", | ||
"JSHint" | ||
], | ||
[ | ||
"CSSLINT", | ||
projectDir.path, | ||
".*/csslint/.*\\.xml\$", | ||
"CssLint" | ||
] | ||
] | ||
} |