jruby-gradle-plugin/build.gradle

117 lines
3.2 KiB
Groovy
Raw Normal View History

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
id 'com.jfrog.bintray' version '1.8.4' apply false
id 'org.ajoberstar.github-pages' version '1.2.0' apply false
id 'org.ysb33r.cloudci.appveyor.testreporter' version '2.5' apply false
id "io.ratpack.ratpack-java" version "1.6.1" apply false
}
2019-03-04 14:28:38 +00:00
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
2019-03-04 14:28:38 +00:00
termsOfServiceAgree = 'yes'
}
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"
}
}
subprojects {
apply plugin: 'maven'
repositories {
jcenter()
maven { url torqueboxProxy }
}
if (project.name != 'docs') {
2019-05-05 13:51:29 +00:00
apply plugin: TestConfigPlugin
apply plugin: 'java-gradle-plugin'
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 plugin: 'org.ysb33r.cloudci.appveyor.testreporter'
2019-05-05 13:51:29 +00:00
apply from: "${rootProject.projectDir}/gradle/integration-tests.gradle"
dependencies {
compile localGroovy()
compile gradleApi()
compile 'org.ysb33r.gradle:grolifant:0.12'
gradleTestRuntime 'org.ysb33r.gradle:grolifant:0.12'
}
codenarc {
sourceSets = [sourceSets.main]
2019-05-05 18:08:39 +00:00
configFile = file("${rootProject.projectDir}/gradle/codenarc.groovy")
}
2015-07-30 14:31:31 +00:00
test {
testLogging {
showStandardStreams = true
exceptionFormat "full"
}
}
2015-07-30 14:31:31 +00:00
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
2015-07-30 14:31:31 +00:00
}
gradleTest {
// https://github.com/jruby-gradle/jruby-gradle-plugin/issues/346
if (JavaVersion.current().java11) {
versions '5.0', '5.4.1'
} else {
versions '4.2', '4.10.2', '5.3.1'
}
dependsOn jar
2015-07-30 14:31:31 +00:00
}
install.dependsOn check
tasks.withType(Test) {
if (gradle.startParameter.isOffline()) {
systemProperties 'TESTS_ARE_OFFLINE': '1'
}
}
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
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
}
task release(type: Exec) {
description 'Create and upload a release'
dependsOn subprojects.collect { ":${it.name}:bintrayUpload" }
commandLine 'git', 'tag', "v${project.version}"
}