97 lines
2.2 KiB
Groovy
97 lines
2.2 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
maven {
|
|
url "https://plugins.gradle.org/m2/"
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
|
|
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
|
|
classpath 'org.ysb33r.gradle:gradletest:1.0-beta12'
|
|
classpath "org.ajoberstar:gradle-git:1.2.0"
|
|
}
|
|
}
|
|
|
|
apply plugin: 'idea'
|
|
|
|
group = 'com.github.jruby-gradle'
|
|
version = '1.6.0-SNAPSHOT'
|
|
defaultTasks 'check', 'assemble'
|
|
sourceCompatibility = '1.8'
|
|
targetCompatibility = '1.8'
|
|
|
|
if (!releaseBuild) {
|
|
version = "${version}-SNAPSHOT"
|
|
}
|
|
|
|
subprojects {
|
|
|
|
apply plugin: 'idea'
|
|
apply plugin: 'maven'
|
|
|
|
repositories {
|
|
jcenter()
|
|
maven { url rubygemsProxy }
|
|
maven { url torqueboxProxy }
|
|
}
|
|
|
|
if(project.name != 'docs') {
|
|
apply plugin: 'groovy'
|
|
apply plugin: 'codenarc'
|
|
apply plugin: 'com.jfrog.bintray'
|
|
apply plugin: 'org.ysb33r.gradletest'
|
|
apply plugin: 'provided-base'
|
|
|
|
dependencies {
|
|
|
|
compile localGroovy()
|
|
compile gradleApi()
|
|
compile 'org.ysb33r.gradle:grolifant:0.3'
|
|
|
|
codenarc(
|
|
"org.codenarc:CodeNarc:0.24",
|
|
"org.codehaus.groovy:groovy-all:2.4.0+"
|
|
)
|
|
}
|
|
|
|
codenarc {
|
|
sourceSets = [sourceSets.main]
|
|
configFile = file("${rootProject.projectDir}/gradle/codenarc.rules")
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
showStandardStreams = true
|
|
exceptionFormat "full"
|
|
}
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
gradleTest {
|
|
versions '2.8', '2.14.1', '3.0', '3.5', '4.1'
|
|
dependsOn jar
|
|
}
|
|
|
|
install.dependsOn check
|
|
}
|
|
|
|
|
|
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}"
|
|
}
|