Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (63 sloc) 2.2 KB
/*
* Main build script, responsible for:
*
* 1. Publishing: upload binaries and templates to Bintray
* 2. Releasing: tag source code in GitHub
* 3. Coverage report: aggregated coverage report for all modules
* 4. Group all tasks: shortcut for all tasks to ease the release process
*
* Plugins that are not used in the root project (this one) are only applied by the modules that use
* them.
*/
plugins {
id "java"
id "jacoco"
id "org.sonarqube" version "2.7"
id "org.jetbrains.kotlin.jvm" version "1.3.31" apply false
id "org.jetbrains.dokka" version "0.9.18" apply false
id "com.jfrog.bintray" version "1.8.4" apply false
id "uk.co.cacoethes.lazybones-templates" version "1.2.3" apply false
}
apply(from: "gradle/sonarqube.gradle")
repositories {
jcenter() // Repository required by Jacoco Report
}
clean {
delete("build", "log", "out", ".vertx", "file-uploads")
delete(
fileTree(rootDir) { include "**/*.log" },
fileTree(rootDir) { include "**/*.hprof" }
)
}
task("publish", dependsOn:
project.getTasksByName("bintrayUpload", true) +
tasks.getByPath(":hexagon_starters:publishAllTemplates")
)
task("release", dependsOn: "publish") {
doLast {
exec { commandLine("git", "tag", "-m", "Release $version".toString(), version) }
exec { commandLine("git", "push", "--tags") }
}
}
task("jacocoReport", dependsOn: getTasksByName ("jacocoTestReport", true), type: JacocoReport) {
final String rootPath = rootDir.absolutePath
final String execPattern = "**/build/jacoco/test.exec"
executionData.setFrom(fileTree(rootPath).include(execPattern))
subprojects.each {
sourceSets(it.sourceSets.main as SourceSet)
}
reports {
html.enabled = true
xml.enabled = true
}
}
project.tasks["sonarqube"].dependsOn("jacocoReport")
task("all", dependsOn:
project.getTasksByName("build", true) +
project.getTasksByName("mkdocs", true) +
project.getTasksByName("jacocoReport", true) +
project.getTasksByName("installDist", true) +
project.getTasksByName("installAllTemplates", true) +
project.getTasksByName("publishToMavenLocal", true) +
project.getTasksByName("tfb", true)
)
You can’t perform that action at this time.