META-INF.archetype-post-generate.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-application-maven-archetype
Show all versions of kotlin-application-maven-archetype
Maven archetype for building Kotlin applications
dir = new File(new File(request.outputDirectory), request.artifactId)
idea = new File(dir, ".idea")
def run(String cmd) {
def process = cmd.execute([], dir)
process.waitForProcessOutput((Appendable)System.out, System.err)
if (process.exitValue() != 0) {
throw new Exception("Command '$cmd' exited with code: ${process.exitValue()}")
}
}
def writeCodeStyle() {
def sb = new StringBuilder()
sb.append('\n')
new URL(request.properties["intellijCodeStyleUrl"]).eachLine {
sb.append(" " + it + "\n")
}
sb.append(" ")
xml = sb.toString()
xml = xml.replaceFirst('\n')
def url = request.properties["intellijInspectionProfileUrl"]
new URL(url).eachLine {
sb.append(" " + it + "\n")
}
sb.append("")
xml = sb.toString()
def m = (~/