Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating IDE Specific configuration with gradle #262

Merged
merged 1 commit into from
Jun 20, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
jacoco
checkstyle
`maven-publish`
id("com.diffplug.gradle.spotless") version "3.27.1"
id("com.diffplug.gradle.spotless") version "4.0.0"
id("org.shipkit.java") version "2.3.1"
id("at.zierler.yamlvalidator") version "1.5.0"
id("org.sonarqube") version "2.8"
Expand Down
27 changes: 27 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import groovy.xml.XmlUtil

build {
doLast {
def ideaFolder = new File('.idea');
if(ideaFolder.exists() && ideaFolder.isDirectory()) {
def xmlFile = new File(".idea/vcs.xml")
def xml = new XmlSlurper().parse(xmlFile)
xml.component.find {it.@name == 'IssueNavigationConfiguration'}.replaceNode {}
xml.appendNode {
component(name: "IssueNavigationConfiguration") {
option(name: 'links') {
list {
IssueNavigationLink {
option(name: "issueRegexp", value: '#(\\d+)')
option(name: "linkRegexp", value: 'https://github.com/junit-pioneer/junit-pioneer/issues/$1')
}
}
}
}
}
xmlFile.withWriter {out->
XmlUtil.serialize(xml, out)
}
}
}
}