2018-08-04 11:46:04 +00:00
|
|
|
plugins {
|
2019-03-04 14:28:38 +00:00
|
|
|
id 'com.gradle.build-scan' version '1.16'
|
2019-05-04 19:37:50 +00:00
|
|
|
id 'org.ysb33r.gradletest' version '2.0-rc.4' apply false
|
2018-08-29 15:20:34 +00:00
|
|
|
id 'com.jfrog.bintray' version '1.8.4' apply false
|
2018-08-04 11:46:04 +00:00
|
|
|
id 'org.ajoberstar.github-pages' version '1.2.0' apply false
|
2015-06-06 20:46:52 +00:00
|
|
|
}
|
2017-09-27 10:36:44 +00:00
|
|
|
|
2019-03-04 14:28:38 +00:00
|
|
|
buildScan {
|
2019-05-05 16:22:20 +00:00
|
|
|
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
|
2019-03-04 14:28:38 +00:00
|
|
|
termsOfServiceAgree = 'yes'
|
|
|
|
}
|
2015-06-06 20:46:52 +00:00
|
|
|
|
2018-08-04 11:46:04 +00:00
|
|
|
allprojects {
|
|
|
|
apply plugin: 'idea'
|
|
|
|
|
|
|
|
|
|
|
|
if (!releaseBuild) {
|
|
|
|
version = "${version}-SNAPSHOT"
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultTasks 'check', 'assemble'
|
|
|
|
sourceCompatibility = '1.8'
|
|
|
|
targetCompatibility = '1.8'
|
|
|
|
|
|
|
|
ext {
|
2019-05-04 19:46:05 +00:00
|
|
|
spockVersion = "org.spockframework:spock-core:1.2-groovy-2.4"
|
2018-08-04 11:46:04 +00:00
|
|
|
}
|
2015-06-06 20:46:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
2017-09-27 10:36:44 +00:00
|
|
|
|
2015-06-06 20:46:52 +00:00
|
|
|
apply plugin: 'maven'
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
2017-09-27 10:36:44 +00:00
|
|
|
maven { url torqueboxProxy }
|
2015-06-06 20:46:52 +00:00
|
|
|
}
|
|
|
|
|
2019-05-05 16:22:20 +00:00
|
|
|
if (project.name != 'docs') {
|
2019-05-05 13:51:29 +00:00
|
|
|
apply plugin: TestConfigPlugin
|
|
|
|
apply plugin: 'java-gradle-plugin'
|
2017-09-27 10:36:44 +00:00
|
|
|
apply plugin: 'groovy'
|
|
|
|
apply plugin: 'codenarc'
|
|
|
|
apply plugin: 'com.jfrog.bintray'
|
|
|
|
apply plugin: 'org.ysb33r.gradletest'
|
2019-05-05 13:51:29 +00:00
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
apply from: "${rootProject.projectDir}/gradle/integration-tests.gradle"
|
2015-06-06 20:46:52 +00:00
|
|
|
|
2018-08-04 11:46:04 +00:00
|
|
|
dependencies {
|
2017-09-27 10:36:44 +00:00
|
|
|
compile localGroovy()
|
|
|
|
compile gradleApi()
|
2018-08-04 11:46:04 +00:00
|
|
|
compile 'org.ysb33r.gradle:grolifant:0.8'
|
|
|
|
gradleTestRuntime 'org.ysb33r.gradle:grolifant:0.8'
|
2015-06-06 20:46:52 +00:00
|
|
|
}
|
|
|
|
|
2017-09-27 10:36:44 +00:00
|
|
|
codenarc {
|
|
|
|
sourceSets = [sourceSets.main]
|
2019-05-05 18:08:39 +00:00
|
|
|
configFile = file("${rootProject.projectDir}/gradle/codenarc.groovy")
|
2017-09-27 10:36:44 +00:00
|
|
|
}
|
2015-07-30 14:31:31 +00:00
|
|
|
|
2017-09-27 10:36:44 +00:00
|
|
|
test {
|
|
|
|
testLogging {
|
|
|
|
showStandardStreams = true
|
|
|
|
exceptionFormat "full"
|
|
|
|
}
|
|
|
|
}
|
2015-07-30 14:31:31 +00:00
|
|
|
|
2017-09-27 10:36:44 +00:00
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.allSource
|
2015-07-30 14:31:31 +00:00
|
|
|
}
|
|
|
|
|
2017-09-27 10:36:44 +00:00
|
|
|
gradleTest {
|
2018-08-04 11:46:04 +00:00
|
|
|
versions '3.0', '3.5', '4.1', '4.7', '4.9'
|
2017-09-27 10:36:44 +00:00
|
|
|
dependsOn jar
|
2015-07-30 14:31:31 +00:00
|
|
|
}
|
2017-09-27 10:36:44 +00:00
|
|
|
|
|
|
|
install.dependsOn check
|
2019-05-05 16:22:20 +00:00
|
|
|
|
|
|
|
tasks.withType(Test) {
|
|
|
|
if (gradle.startParameter.isOffline()) {
|
|
|
|
systemProperties 'TESTS_ARE_OFFLINE': '1'
|
|
|
|
}
|
|
|
|
}
|
2019-05-05 16:44:08 +00:00
|
|
|
|
|
|
|
tasks.withType(CodeNarc) { codenarcSourceSetTask ->
|
|
|
|
def reportName = (codenarcSourceSetTask.name - 'codenarc').uncapitalize()
|
|
|
|
def ideReport = reports.add(org.gradle.api.reporting.internal.TaskGeneratedSingleFileReport, 'ide', reports.task)
|
|
|
|
ideReport.enabled = true
|
|
|
|
ideReport.destination = file( "${project.codenarc.reportsDir}/${reportName}.ide.txt")
|
|
|
|
}
|
|
|
|
|
2015-07-30 14:31:31 +00:00
|
|
|
}
|
2017-09-27 10:36:44 +00:00
|
|
|
|
2015-09-21 00:52:56 +00:00
|
|
|
|
|
|
|
idea {
|
|
|
|
module {
|
|
|
|
downloadJavadoc = true
|
|
|
|
downloadSources = true
|
|
|
|
}
|
|
|
|
}
|
2015-06-06 20:46:52 +00:00
|
|
|
}
|
2015-06-06 21:27:40 +00:00
|
|
|
|
|
|
|
task release(type: Exec) {
|
|
|
|
description 'Create and upload a release'
|
2015-10-02 14:45:53 +00:00
|
|
|
dependsOn subprojects.collect { ":${it.name}:bintrayUpload" }
|
2015-06-06 21:27:40 +00:00
|
|
|
commandLine 'git', 'tag', "v${project.version}"
|
|
|
|
}
|